Bug 1179685 - Fix messageport assert in wpt service worker test. r=baku

This commit is contained in:
Catalin Badea 2015-07-14 17:41:13 -07:00
Родитель 2e4a1c88ee
Коммит e031508bf0
2 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -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));