зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1503664. Keep trying to pin down why ClearDocumentDependentSlots is crashing. r=mccr8
This commit is contained in:
Родитель
19dbe58e02
Коммит
006e812485
|
@ -1070,6 +1070,9 @@ CreateInterfaceObjects(JSContext* cx, JS::Handle<JSObject*> global,
|
|||
isChrome ? chromeOnlyProperties : nullptr,
|
||||
unscopableNames, toStringTag, isGlobal);
|
||||
if (!proto) {
|
||||
if (name && !strcmp(name, "Document")) {
|
||||
MOZ_CRASH("Bug 1405521/1488480: CreateInterfacePrototypeObject failed for Document.prototype");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1088,6 +1091,9 @@ CreateInterfaceObjects(JSContext* cx, JS::Handle<JSObject*> global,
|
|||
isChrome,
|
||||
defineOnGlobal);
|
||||
if (!interface) {
|
||||
if (name && !strcmp(name, "Document")) {
|
||||
MOZ_CRASH("Bug 1405521/1488480: CreateInterfaceObject failed for Document");
|
||||
}
|
||||
if (protoCache) {
|
||||
// If we fail we need to make sure to clear the value of protoCache we
|
||||
// set above.
|
||||
|
|
|
@ -3113,6 +3113,9 @@ class CGCreateInterfaceObjectsMethod(CGAbstractMethod):
|
|||
${name}, aDefineOnGlobal,
|
||||
${unscopableNames},
|
||||
${isGlobal});
|
||||
if (protoCache && !*protoCache) {
|
||||
$*{maybeCrash}
|
||||
}
|
||||
""",
|
||||
protoClass=protoClass,
|
||||
parentProto=parentProto,
|
||||
|
@ -3127,7 +3130,8 @@ class CGCreateInterfaceObjectsMethod(CGAbstractMethod):
|
|||
chromeProperties=chromeProperties,
|
||||
name='"' + self.descriptor.interface.identifier.name + '"' if needInterfaceObject else "nullptr",
|
||||
unscopableNames="unscopableNames" if self.haveUnscopables else "nullptr",
|
||||
isGlobal=toStringBool(isGlobal))
|
||||
isGlobal=toStringBool(isGlobal),
|
||||
maybeCrash=maybecrash("dom::CreateInterfaceObjects failed for Document"))
|
||||
|
||||
# If we fail after here, we must clear interface and prototype caches
|
||||
# using this code: intermediate failure must not expose the interface in
|
||||
|
|
Загрузка…
Ссылка в новой задаче