diff options
author | Moonchild <mcwerewolf@gmail.com> | 2018-04-08 18:16:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-08 18:16:01 +0200 |
commit | 6ac47e95318efb654682ed774fbbde1eb0fa2dd3 (patch) | |
tree | 05e3594dc85fd66d29d122184157901fe7e51837 /dom/xhr/XMLHttpRequestWorker.cpp | |
parent | bf6bb142fc5bcb49b053788e06160af304f639e5 (diff) | |
parent | bbd4001cb261cc54e2adf804ea7cbeb09078d7d9 (diff) | |
download | UXP-6ac47e95318efb654682ed774fbbde1eb0fa2dd3.tar UXP-6ac47e95318efb654682ed774fbbde1eb0fa2dd3.tar.gz UXP-6ac47e95318efb654682ed774fbbde1eb0fa2dd3.tar.lz UXP-6ac47e95318efb654682ed774fbbde1eb0fa2dd3.tar.xz UXP-6ac47e95318efb654682ed774fbbde1eb0fa2dd3.zip |
Merge pull request #94 from trav90/js-work
Fix Value::isGCThing footgun, stop returning true for NullValue
Diffstat (limited to 'dom/xhr/XMLHttpRequestWorker.cpp')
-rw-r--r-- | dom/xhr/XMLHttpRequestWorker.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dom/xhr/XMLHttpRequestWorker.cpp b/dom/xhr/XMLHttpRequestWorker.cpp index f61383baf..93b93a2b1 100644 --- a/dom/xhr/XMLHttpRequestWorker.cpp +++ b/dom/xhr/XMLHttpRequestWorker.cpp @@ -1148,8 +1148,8 @@ EventRunnable::PreDispatch(WorkerPrivate* /* unused */) } else { bool doClone = true; JS::Rooted<JS::Value> transferable(cx); - JS::Rooted<JSObject*> obj(cx, response.isObjectOrNull() ? - response.toObjectOrNull() : nullptr); + JS::Rooted<JSObject*> obj(cx, response.isObject() ? + &response.toObject() : nullptr); if (obj && JS_IsArrayBufferObject(obj)) { // Use cached response if the arraybuffer has been transfered. if (mProxy->mArrayBufferResponseWasTransferred) { |