Bug 1399217 - Disable wasm disassembly for non-binary source. r=jlast
☠☠ backed out by e8744e268106 ☠ ☠
authorYury Delendik <ydelendik@mozilla.com>
Tue, 12 Sep 2017 13:57:31 -0500
changeset 430043 2ac5c1345f1353b685a8e18abe31134e0c0712cf
parent 430042 5872feaa0656d6e2017abfdfefc920c3d690fe68
child 430044 cb9cbed526b99b5256d62095e14e452683ff65d4
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjlast
bugs1399217
milestone57.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 1399217 - Disable wasm disassembly for non-binary source. r=jlast MozReview-Commit-ID: KEyyOjyKXPF
devtools/client/sourceeditor/editor.js
--- a/devtools/client/sourceeditor/editor.js
+++ b/devtools/client/sourceeditor/editor.js
@@ -546,17 +546,17 @@ Editor.prototype = {
 
   /**
    * Replaces whatever is in the text area with the contents of
    * the 'value' argument.
    */
   setText: function (value) {
     let cm = editors.get(this);
 
-    if (typeof value !== "string") {  // wasm?
+    if (typeof value !== "string" && 'binary' in value) {  // wasm?
       // binary does not survive as Uint8Array, converting from string
       let binary = value.binary;
       let data = new Uint8Array(binary.length);
       for (let i = 0; i < data.length; i++) {
         data[i] = binary.charCodeAt(i);
       }
       let { lines, done } = getWasmText(this.getDoc(), data);
       const MAX_LINES = 10000000;