Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(174)

Side by Side Diff: LayoutTests/http/tests/navigatorconnect/resources/connect-helper.js

Issue 885343002: bindings: Fixes connect-helper to use stringifyDOMObject. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « LayoutTests/http/tests/navigatorconnect/resources/connect-helper.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 try {
2 importScripts("/js-test-resources/js-test.js");
jsbell 2015/01/30 17:58:10 Can we do this instead: if ('importScripts' in se
Yuki 2015/02/02 07:51:12 Done.
3 } catch (e) {}
4
1 self.onmessage = function(e) { 5 self.onmessage = function(e) {
2 navigator.connect(e.data.connect) 6 navigator.connect(e.data.connect)
3 .then(function(port) { 7 .then(function(port) {
4 e.data.port.postMessage({success: true, result: port}, [port]); 8 e.data.port.postMessage({success: true, result: port}, [port]);
5 }) 9 })
6 .catch(function(error) { 10 .catch(function(error) {
7 // Not all errors can be serialized as a SerializedScriptValue, so 11 // Not all errors can be serialized as a SerializedScriptValue, so
8 // convert to JSON and parse to get just the bits that certainly can. 12 // convert to JSON and parse to get just the bits that certainly can.
9 e.data.port.postMessage( 13 e.data.port.postMessage(
10 {success: false, result: JSON.parse(JSON.stringify(error))}); 14 {success: false, result: JSON.parse(stringifyDOMObject(error))});
11 }); 15 });
12 }; 16 };
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/navigatorconnect/resources/connect-helper.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698