Skip to content

Instantly share code, notes, and snippets.

@allstarschh
Created December 14, 2018 14:14
Show Gist options
  • Save allstarschh/c89bb72abe6aa0c4576f048c7e43c7a9 to your computer and use it in GitHub Desktop.
Save allstarschh/c89bb72abe6aa0c4576f048c7e43c7a9 to your computer and use it in GitHub Desktop.
commit 205ce5730eef79418749366aadcedc557af17ca5
Author: Yoshi Cheng-Hao Huang <allstars.chh@gmail.com>
Date: Fri Dec 14 15:11:10 2018 +0100
use unbarrieredGet()
diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp
index 258a5fe9f0d8..9fc11ee2eb2f 100644
--- a/js/src/vm/Debugger.cpp
+++ b/js/src/vm/Debugger.cpp
@@ -3187,17 +3187,17 @@ void Debugger::traceCrossCompartmentEdges(JSTracer* trc) {
continue;
}
// Every debuggee has at least one debugger, so in this case
// getDebuggers can't return nullptr.
const GlobalObject::DebuggerVector* debuggers = global->getDebuggers();
MOZ_ASSERT(debuggers);
for (auto p = debuggers->begin(); p != debuggers->end(); p++) {
- Debugger* dbg = *p;
+ Debugger* dbg = p->unbarrieredGet();
// dbg is a Debugger with at least one debuggee. Check three things:
// - dbg is actually in a compartment that is being marked
// - it isn't already marked
// - it actually has hooks that might be called
GCPtrNativeObject& dbgobj = dbg->toJSObjectRef();
if (!dbgobj->zone()->isGCMarking()) {
continue;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment