☠☠ backed out by 85658d613c77 ☠ ☠ | |
author | Boris Zbarsky <bzbarsky@mit.edu> |
Thu, 23 Mar 2017 03:06:25 -0400 | |
changeset 348940 | 3ccb231829a94c8d5aff22222ecfe0ef1f1d50a7 |
parent 348939 | 8ba41a1bd062a484ed24a5a25758c13eb57b8429 |
child 348941 | 6235799ad4fd1e408a6c348c41f04d9ff7582e3d |
push id | 88364 |
push user | bzbarsky@mozilla.com |
push date | Thu, 23 Mar 2017 07:06:40 +0000 |
treeherder | mozilla-inbound@3ccb231829a9 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | bholley |
bugs | 1349690 |
milestone | 55.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/base/ScriptSettings.cpp +++ b/dom/base/ScriptSettings.cpp @@ -371,16 +371,23 @@ AutoJSAPI::InitInternal(nsIGlobalObject* if (haveException) { JS::Rooted<JS::Value> exn(aCx); JS_GetPendingException(aCx, &exn); JS_ClearPendingException(aCx); if (exn.isObject()) { JS::Rooted<JSObject*> exnObj(aCx, &exn.toObject()); + // Make sure we can actually read things from it. This UncheckedUwrap is + // safe because we're only getting data for a debug printf. In + // particular, we do not expose this data to anyone, which is very + // important; otherwise it could be a cross-origin information leak. + exnObj = js::UncheckedUwrap(exnObj); + JSAutoCompartment ac(aCx, exnObj); + nsAutoJSString stack, filename, name, message; int32_t line; JS::Rooted<JS::Value> tmp(aCx); if (!JS_GetProperty(aCx, exnObj, "filename", &tmp)) { JS_ClearPendingException(aCx); } if (tmp.isUndefined()) {