mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-01 00:32:11 +00:00
Bug 1570091 Part 1 - Add public API for whether a global has instrumentation enabled, r=tcampbell.
Differential Revision: https://phabricator.services.mozilla.com/D39932 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
fbc5c77152
commit
9663682447
@ -2685,6 +2685,12 @@ extern JS_FRIEND_API void LogDtor(void* self, const char* type, uint32_t sz);
|
||||
*/
|
||||
extern JS_FRIEND_API uint64_t GetGCHeapUsageForObjectZone(JSObject* obj);
|
||||
|
||||
/**
|
||||
* Return whether a global object's realm has had instrumentation enabled by a
|
||||
* Debugger.
|
||||
*/
|
||||
extern JS_FRIEND_API bool GlobalHasInstrumentation(JSObject* global);
|
||||
|
||||
} /* namespace js */
|
||||
|
||||
#endif /* jsfriendapi_h */
|
||||
|
@ -267,4 +267,9 @@ bool InstrumentationScriptIdOperation(JSContext* cx, HandleScript script,
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GlobalHasInstrumentation(JSObject* global) {
|
||||
return global->is<js::GlobalObject>() &&
|
||||
global->as<js::GlobalObject>().getInstrumentationHolder();
|
||||
}
|
||||
|
||||
} // namespace js
|
||||
|
Loading…
Reference in New Issue
Block a user