From 182bf0bbbdde7c8ff6b8d33b8abd1c0894039fe8 Mon Sep 17 00:00:00 2001 From: Robin Berjon Date: Tue, 1 Apr 2014 11:05:22 +0200 Subject: [PATCH 1/2] when opening through a@target window.opener is defined but the SOP can trigger an exception if the origins don't match --- testharnessreport.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/testharnessreport.js b/testharnessreport.js index 0f02725a348d75..36d1810344b011 100644 --- a/testharnessreport.js +++ b/testharnessreport.js @@ -383,7 +383,10 @@ metadata_generator.setup(); * default in-browser runner to configure the timeout and the * rendering of results */ -if (window.opener && "testharness_properties" in window.opener) { - setup(window.opener.testharness_properties); +try { + if (window.opener && "testharness_properties" in window.opener) { + setup(window.opener.testharness_properties); + } } +catch (e) {} // vim: set expandtab shiftwidth=4 tabstop=4: From 7b527b4ef0d6b17dc6db46588f29be7c447081aa Mon Sep 17 00:00:00 2001 From: Robin Berjon Date: Wed, 2 Apr 2014 15:58:00 +0200 Subject: [PATCH 2/2] reformating to assuage James's sadistic tendencies --- testharnessreport.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testharnessreport.js b/testharnessreport.js index 36d1810344b011..acd99f50dc061f 100644 --- a/testharnessreport.js +++ b/testharnessreport.js @@ -387,6 +387,6 @@ try { if (window.opener && "testharness_properties" in window.opener) { setup(window.opener.testharness_properties); } +} catch (e) { } -catch (e) {} // vim: set expandtab shiftwidth=4 tabstop=4: