author | Boris Zbarsky <bzbarsky@mit.edu> |
Thu, 03 Jan 2019 20:31:05 +0000 | |
changeset 452468 | 2abc6090d9f41d876da227077b244cb6cc1702c7 |
parent 452467 | 7c45873d6989034f4823fe14501a685aae3e787d |
child 452469 | 4d42e4786e4fef58c9fd4e26f0f35dcc9cdf3df3 |
push id | 35308 |
push user | aciure@mozilla.com |
push date | Fri, 04 Jan 2019 03:44:03 +0000 |
treeherder | mozilla-central@7be73b4e5299 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | nika |
bugs | 1517415 |
milestone | 66.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/dom/bindings/ToJSValue.cpp +++ b/dom/bindings/ToJSValue.cpp @@ -68,16 +68,21 @@ bool ToJSValue(JSContext* aCx, const Win aValue.setNull(); return true; } JS::Rooted<JSObject*> windowProxy(aCx); if (bc->GetDocShell()) { windowProxy = bc->GetWindowProxy(); if (!windowProxy) { nsPIDOMWindowOuter* window = bc->GetDOMWindow(); + if (!window) { + // Torn down enough that we should just return null. + aValue.setNull(); + return true; + } if (!window->EnsureInnerWindow()) { return Throw(aCx, NS_ERROR_UNEXPECTED); } windowProxy = bc->GetWindowProxy(); } return ToJSValue(aCx, windowProxy, aValue); }