зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1632683
- Define @@toStringTag on miscellaneous objects. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D72247
This commit is contained in:
Родитель
b1c3df025a
Коммит
aa51d86203
|
@ -121,7 +121,7 @@
|
|||
#include "vm/JSAtom-inl.h" // for AtomToId, ValueToId
|
||||
#include "vm/JSContext-inl.h" // for JSContext::check
|
||||
#include "vm/JSObject-inl.h" // for JSObject::isCallable, NewTenuredObjectWithGivenProto
|
||||
#include "vm/JSScript-inl.h" // for JSScript::isDebuggee, JSScript
|
||||
#include "vm/JSScript-inl.h" // for JSScript::isDebuggee, JSScript
|
||||
#include "vm/NativeObject-inl.h" // for NativeObject::ensureDenseInitializedLength
|
||||
#include "vm/ObjectOperations-inl.h" // for GetProperty, HasProperty
|
||||
#include "vm/Realm-inl.h" // for AutoRealm::AutoRealm
|
||||
|
@ -6075,6 +6075,7 @@ const JSPropertySpec Debugger::properties[] = {
|
|||
JS_DEBUG_PSGS("collectCoverageInfo", getCollectCoverageInfo,
|
||||
setCollectCoverageInfo),
|
||||
JS_DEBUG_PSG("memory", getMemory),
|
||||
JS_STRING_SYM_PS(toStringTag, "Debugger", JSPROP_READONLY),
|
||||
JS_PS_END};
|
||||
|
||||
const JSFunctionSpec Debugger::methods[] = {
|
||||
|
|
|
@ -10224,6 +10224,10 @@ static JSObject* NewGlobalObject(JSContext* cx, JS::RealmOptions& options,
|
|||
/* Initialize FakeDOMObject.prototype */
|
||||
InitDOMObject(domProto);
|
||||
|
||||
if (!DefineToStringTag(cx, glob, cx->names().global)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
JS_FireOnNewGlobalObject(cx, glob);
|
||||
}
|
||||
|
||||
|
|
|
@ -394,6 +394,7 @@ const JSClass SavedFrame::protoClass_ = {
|
|||
JS_PSG("asyncCause", SavedFrame::asyncCauseProperty, 0),
|
||||
JS_PSG("asyncParent", SavedFrame::asyncParentProperty, 0),
|
||||
JS_PSG("parent", SavedFrame::parentProperty, 0),
|
||||
JS_STRING_SYM_PS(toStringTag, "SavedFrame", JSPROP_READONLY),
|
||||
JS_PS_END};
|
||||
|
||||
/* static */
|
||||
|
|
Загрузка…
Ссылка в новой задаче