зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1179685 - Fix messageport assert in wpt service worker test. r=baku
This commit is contained in:
Родитель
de7e734bc6
Коммит
820bc62413
|
@ -129,10 +129,11 @@ private:
|
|||
closure.mClonedObjects.SwapElements(mClosure.mClonedObjects);
|
||||
MOZ_ASSERT(mClosure.mMessagePorts.IsEmpty());
|
||||
closure.mMessagePortIdentifiers.SwapElements(mClosure.mMessagePortIdentifiers);
|
||||
closure.mParentWindow = do_QueryInterface(aTargetContainer->GetParentObject());
|
||||
|
||||
JS::Rooted<JS::Value> messageData(aCx);
|
||||
if (!mBuffer.read(aCx, &messageData,
|
||||
WorkerStructuredCloneCallbacks(true))) {
|
||||
WorkerStructuredCloneCallbacks(true), &closure)) {
|
||||
xpc::Throw(aCx, NS_ERROR_DOM_DATA_CLONE_ERR);
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ t.step(function() {
|
|||
.then(function() { return with_iframe(scope); })
|
||||
.then(function(frame) {
|
||||
var w = frame.contentWindow;
|
||||
w.onmessage = t.step_func(onMessage);
|
||||
w.navigator.serviceWorker.onmessage = t.step_func(onMessage);
|
||||
w.navigator.serviceWorker.controller.postMessage('ping');
|
||||
})
|
||||
.catch(unreached_rejection(t));
|
||||
|
|
Загрузка…
Ссылка в новой задаче