Bug 1356810: Follow-up: Fix SDK worker tests.
authorKris Maglione <maglione.k@gmail.com>
Wed, 19 Apr 2017 14:10:52 -0700
changeset 353868 bf8468e259dce509bfe0c4cc51874a0797932e36
parent 353867 3e59d06de61430055e43fca4981f27009a8a71a0
child 353869 72812cf49ddfb2203118986fca36c8048fb54918
push id89367
push usermaglione.k@gmail.com
push dateWed, 19 Apr 2017 21:11:21 +0000
treeherdermozilla-inbound@bf8468e259dc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1356810
milestone55.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
Bug 1356810: Follow-up: Fix SDK worker tests. MozReview-Commit-ID: 8ObX3OKozCF
addon-sdk/source/lib/sdk/loader/sandbox.js
--- a/addon-sdk/source/lib/sdk/loader/sandbox.js
+++ b/addon-sdk/source/lib/sdk/loader/sandbox.js
@@ -58,17 +58,19 @@ exports.evaluate = evaluate;
  *    It must be a local chrome:, resource:, file: or data: URL.
  */
 function load(sandbox, uri) {
   if (uri.indexOf('data:') === 0) {
     let source = uri.substr(uri.indexOf(',') + 1);
 
     return evaluate(sandbox, decodeURIComponent(source), '1.8', uri, 0);
   } else {
-    return scriptLoader.loadSubScript(uri, sandbox, 'UTF-8');
+    return scriptLoader.loadSubScriptWithOptions(uri, {target: sandbox,
+                                                       charset: 'UTF-8',
+                                                       wantReturnValue: true});
   }
 }
 exports.load = load;
 
 /**
  * Forces the given `sandbox` to be freed immediately.
  */
 exports.nuke = Cu.nukeSandbox