Bug 1443964: Follow-up: Fix missed CPOW usage in devtools tests. r=bustage
authorKris Maglione <maglione.k@gmail.com>
Thu, 08 Mar 2018 16:57:18 -0800
changeset 462323 2be3c0d8f1e9ab1fa1a88d2716204b2005c8d6d4
parent 462322 16cdea986fe14af9eb4a5b04e5e0769ae1d5a759
child 462324 7550436e4ca33155397982f80a889cf509d66976
push id1683
push usersfraser@mozilla.com
push dateThu, 26 Apr 2018 16:43:40 +0000
treeherdermozilla-release@5af6cb21869d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbustage
bugs1443964
milestone60.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 1443964: Follow-up: Fix missed CPOW usage in devtools tests. r=bustage MozReview-Commit-ID: 1Hv3VR5yIO5
devtools/client/shadereditor/test/head.js
--- a/devtools/client/shadereditor/test/head.js
+++ b/devtools/client/shadereditor/test/head.js
@@ -43,17 +43,17 @@ registerCleanupFunction(() => {
 /**
  * Call manually in tests that use frame script utils after initializing
  * the shader editor. Must be called after initializing so we can detect
  * whether or not `content` is a CPOW or not. Call after init but before navigating
  * to different pages, as bfcache and thus shader caching gets really strange if
  * frame script attached in the middle of the test.
  */
 function loadFrameScripts() {
-  if (Cu.isCrossProcessWrapper(content)) {
+  if (!content) {
     loadFrameScriptUtils();
   }
 }
 
 function handleError(aError) {
   ok(false, "Got an error: " + aError.message + "\n" + aError.stack);
   finish();
 }
@@ -125,17 +125,17 @@ function ensurePixelIs(aFront, aPosition
     }
 
     ok(false, "Expected pixel was not already shown at: " + aPosition.toSource());
     throw new Error("Expected pixel was not already shown at: " + aPosition.toSource());
   });
 }
 
 function navigateInHistory(aTarget, aDirection, aWaitForTargetEvent = "navigate") {
-  if (Cu.isCrossProcessWrapper(content)) {
+  if (!content) {
     let mm = gBrowser.selectedBrowser.messageManager;
     mm.sendAsyncMessage("devtools:test:history", { direction: aDirection });
   } else {
     executeSoon(() => content.history[aDirection]());
   }
   return once(aTarget, aWaitForTargetEvent);
 }