Files
roytam1 2859b42d1c import changes from `dev' branch of rmottola/Arctic-Fox:
- Bug 1210573 - Add attribute 'packageIdentifier' to nsIPackagedAppUtils. r=valentin. (0115fa1b85)
- Bug 1178518 - Verify signed packages. r=valentin (5decf51ecb)
- Bug 1178518 - Add an AppTrustedRoot for signed packaged app. r=keeler (15e50605b4)
- Bug 1177013 - test_cpows.xul test for CPOW cancelation (r=dvander) (867c40bec1)
- Bug 1215167 - Forbid unsafe browser CPOWs (disabled by default for now) (r=mrbkap) (cee45a21b1)
- Bug 1174487. Stop using JS_ReportPendingException in ThrowAndReport. Just let the AutoJSAPI do the work for us. r=bholley (877d91b8ab)
- Bug 1213289 part 1. Change dom::Throw to take an XPCOM string, not a raw C string, for the message. r=bkelly (d15fbd30d5)
- Bug 1213289 part 2. Introduce ErrorResult::ClearUnionData and use it in various places where we're trying to do that. r=bkelly (c7e5dac146)
- Bug 1213289 part 3. Add a way to throw a DOMException with a custom message on ErrorResult. r=bkelly (aef71f28a9)
- Bug 1213289 part 4. Convert to using an enum for tracking our union state. r=bkelly (def36e74a1)
- Bug 1174593 - Null check context compartment in GetCurrentJSStack(). r=bholley (a785100a75)
- Bug 1216819 - Allow JSAPI SavedFrame accessors to skip past self-hosted frames. r=bz (e7c40f2c30)
- Bug 1200832 - make Console.trace follow async parents; r=baku,bgrins (9694111f6b)
- Bug 1218496 - Add MOZ_COUNT_CTOR/DTOR to ErrorResult::Message. r=bz (53ad08d1d3)
- Bug 1209107 - Only expose module environment object through testing functions r=shu (5fc969293e)
- Bug 930414 - Update module scope chain handling following addition of global lexical scope r=shu (1fc60942f1)
- fix typo (385064acb8)
- Bug 1215341 - Make assignment to const errors runtime TypeErrors in the frontend and interpreter. (r=jandem) (b1f959ad34)
- Bug 930414 - Implement module namespaces r=shu (8c78ae93f2)
- Bug 930414 - Make |this| undefined in modules r=shu (effe64e5ec)
- Bug 930414 - Replace |thisObject| object op with |thisValue| and use if for modules r=shu r=smaug (4875da587e)
- Bug 1125423 part 1 - Attach WindowProxies to globals instead of using innerObject/outerObject hooks. r=bz,luke (ae07ae6add)
- Bug 1125423 part 2 - Rename stopAtOuter argument to *Unwrap functionsto stopAtWindowProxy. r=bz (87334947c7)
- Bug 1125423 part 3 - Use IsWindow/IsWindowProxy functions instead of checking for Class hooks. r=bz (ec479123de)
- Bug 1219183 - Update comments that reference renamed thisObject hook r=shu (d99fd5f5a4)
- Bug 1125423 part 4 - Make GetThisValue infallible, stop invoking the Class hook. r=shu (7780fae25c)
- Bug 1125423 part 5 - Remove innerObject/outerObject/thisValue Class hooks. r=luke (e6798ba62f)
- Bug 1125423 part 6 - Remove nsGlobalWindow::OuterObject and ObjectToOuterObjectValue. r=bz (9c69c88ffc)
- Bug 1217061 - Report OOMs in IonCache::linkAndAttachStub(). r=djvj (6515dfc38f)
- Bug 1215573 - Remove AutoWritableJitCode from IonCache::updateBaseAddress. r=nbp (3b01574971)
- Bug 1209118 part 1 - Add id operand to MGetPropertyCache. r=efaust (d030b03035)
- Bug 1209118 part 2 - Fix GetPropertyIC stubs. r=efaust (3de861379e)
- Bug 1209118 part 3 - Move arguments element stub. r=efaust (90416752ec)
- Bug 1209118 part 4 - Move dense element stub. r=efaust (1c00927242)
- Bug 1209118 part 5 - Move dense element hole stub. r=efaust (888aeac645)
- Bug 1209118 part 6 - Move typed-or-unboxed element stub. r=efaust (1faf3c96eb)
- Bug 1209118 part 7 - Disable GetPropertyIC when the IC fails to attach stubs. r=efaust (ee29616d9e)
- Bug 1209118 part 8 - Use MGetPropertyCache for GETELEM. r=efaust (9ce7df2660)
- Bug 1209118 part 9 - rm MGetElementCache, GetElementIC. r=efaust (0c1747a8f8)
- Bug 1209118 part 10 - Fix a performance issue when disabling GetPropertyIC. r=efaust (c915688ed4)
- Bug 1209118 part 11 - Fix and simplify condition in GetPropertyIC::maybeDisable. r=efaust (051d4bc465)
- Bug 1214562 part 1 - SetElementCache no longer needs a byteop register on x86. r=bhackett (51353013a1)
- Bug 1214163 - Clean up SetPropertyIC::update. r=efaust (a520d092ac)
- Bug 1214562 part 2 - Refactor SetPropertyCache regalloc. r=bhackett (e7be5c651b)
- Bug 1216151 - Ensure the object has a non-lazy group in SetPropertyIC::tryAttachStub. r=efaust (205f6770cb)
- Bug 1213859 - Focus and blur events should not be cancelable; r=smaug (17e8f894d7)
2022-10-24 11:58:19 +08:00

87 lines
2.0 KiB
C++

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "JSDebugger.h"
#include "nsIXPConnect.h"
#include "nsThreadUtils.h"
#include "jsapi.h"
#include "jsfriendapi.h"
#include "jswrapper.h"
#include "mozilla/ModuleUtils.h"
#include "nsServiceManagerUtils.h"
#include "nsMemory.h"
#define JSDEBUGGER_CONTRACTID \
"@mozilla.org/jsdebugger;1"
#define JSDEBUGGER_CID \
{ 0x0365cbd5, 0xd46e, 0x4e94, { 0xa3, 0x9f, 0x83, 0xb6, 0x3c, 0xd1, 0xa9, 0x63 } }
namespace mozilla {
namespace jsdebugger {
NS_GENERIC_FACTORY_CONSTRUCTOR(JSDebugger)
NS_IMPL_ISUPPORTS(JSDebugger, IJSDebugger)
JSDebugger::JSDebugger()
{
}
JSDebugger::~JSDebugger()
{
}
NS_IMETHODIMP
JSDebugger::AddClass(JS::Handle<JS::Value> global, JSContext* cx)
{
nsresult rv;
nsCOMPtr<nsIXPConnect> xpc = do_GetService(nsIXPConnect::GetCID(), &rv);
if (!global.isObject()) {
return NS_ERROR_INVALID_ARG;
}
JS::RootedObject obj(cx, &global.toObject());
obj = js::UncheckedUnwrap(obj, /* stopAtWindowProxy = */ false);
if (!obj) {
return NS_ERROR_FAILURE;
}
JSAutoCompartment ac(cx, obj);
if (JS_GetGlobalForObject(cx, obj) != obj) {
return NS_ERROR_INVALID_ARG;
}
if (!JS_DefineDebuggerObject(cx, obj)) {
return NS_ERROR_FAILURE;
}
return NS_OK;
}
} // namespace jsdebugger
} // namespace mozilla
NS_DEFINE_NAMED_CID(JSDEBUGGER_CID);
static const mozilla::Module::CIDEntry kJSDebuggerCIDs[] = {
{ &kJSDEBUGGER_CID, false, nullptr, mozilla::jsdebugger::JSDebuggerConstructor },
{ nullptr }
};
static const mozilla::Module::ContractIDEntry kJSDebuggerContracts[] = {
{ JSDEBUGGER_CONTRACTID, &kJSDEBUGGER_CID },
{ nullptr }
};
static const mozilla::Module kJSDebuggerModule = {
mozilla::Module::kVersion,
kJSDebuggerCIDs,
kJSDebuggerContracts
};
NSMODULE_DEFN(jsdebugger) = &kJSDebuggerModule;