mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 920840 - Crash when JS-implemented WebIDL's init method returns a value other than undefined. r=bz
This commit is contained in:
parent
51b40471b2
commit
232783c6e4
@ -2040,8 +2040,13 @@ ConstructJSImplementation(JSContext* aCx, const char* aContractId,
|
||||
aRv.Throw(rv);
|
||||
return nullptr;
|
||||
}
|
||||
MOZ_ASSERT(initReturn.isUndefined(),
|
||||
"nsIDOMGlobalPropertyInitializer should return undefined");
|
||||
// With JS-implemented WebIDL, the return value of init() is not used to determine
|
||||
// if init() failed, so init() should only return undefined. Any kind of permission
|
||||
// or pref checking must happen by adding an attribute to the WebIDL interface.
|
||||
if (!initReturn.isUndefined()) {
|
||||
MOZ_ASSERT(false, "The init() method for JS-implemented WebIDL should not return anything");
|
||||
MOZ_CRASH();
|
||||
}
|
||||
}
|
||||
// Extract the JS implementation from the XPCOM object.
|
||||
nsCOMPtr<nsIXPConnectWrappedJS> implWrapped =
|
||||
|
Loading…
Reference in New Issue
Block a user