Skip to content

Commit

Permalink
Bug 1052089 - Make the junk scope invisible to the debugger and Compo…
Browse files Browse the repository at this point in the history
…nents-less. r=billm

This prevents the JS engine from trying to fire off debugger notifications and
do other complicated things when we create this thing early in startup in the
upcoming patches.
  • Loading branch information
bholley committed Aug 18, 2014
1 parent 001d7c1 commit b4662a9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions js/xpconnect/src/XPCJSRuntime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3558,6 +3558,8 @@ XPCJSRuntime::GetJunkScope()
AutoSafeJSContext cx;
SandboxOptions options;
options.sandboxName.AssignLiteral("XPConnect Junk Compartment");
options.invisibleToDebugger = true;
options.wantComponents = false;
RootedValue v(cx);
nsresult rv = CreateSandboxObject(cx, &v, nsContentUtils::GetSystemPrincipal(), options);
NS_ENSURE_SUCCESS(rv, nullptr);
Expand Down

0 comments on commit b4662a9

Please sign in to comment.