зеркало из https://github.com/mozilla/gecko-dev.git
Bug 745483 - Don't assert that TI is enabled when the pref is disabled. r=jdm
This commit is contained in:
Родитель
5b516e71b9
Коммит
75d953011d
|
@ -45,6 +45,7 @@
|
|||
#include "mozilla/Assertions.h"
|
||||
#include "mozilla/Base64.h"
|
||||
#include "mozilla/Util.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
|
||||
#include "xpcprivate.h"
|
||||
#include "XPCWrapper.h"
|
||||
|
@ -1206,6 +1207,7 @@ xpc_CreateGlobalObject(JSContext *cx, JSClass *clasp,
|
|||
MOZ_ASSERT_IF(strcmp(clasp->name, "Sandbox") &&
|
||||
strcmp(clasp->name, "nsXBLPrototypeScript compilation scope") &&
|
||||
strcmp(clasp->name, "nsXULPrototypeScript compilation scope") &&
|
||||
mozilla::Preferences::GetBool("javascript.options.typeinference") &&
|
||||
(ssm = XPCWrapper::GetSecurityManager()) &&
|
||||
NS_SUCCEEDED(ssm->IsSystemPrincipal(principal, &isSystem.value)) &&
|
||||
!isSystem.value,
|
||||
|
|
|
@ -94,6 +94,7 @@ _TEST_FILES = bug500931_helper.html \
|
|||
file_bug658560.html \
|
||||
test_bug655297.html \
|
||||
test_bug691059.html \
|
||||
test_bug745483.html \
|
||||
file_nodelists.html \
|
||||
file_bug706301.html \
|
||||
file_exnstack.html \
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=745483
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test for Bug 745483</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=745483">Mozilla Bug 745483</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none">
|
||||
|
||||
</div>
|
||||
<pre id="test">
|
||||
<script type="application/javascript">
|
||||
|
||||
/** Test for Bug 745483 **/
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
// Make sure we can make iframes with TI disabled.
|
||||
SpecialPowers.pushPrefEnv({ set: [['javascript.options.typeinference', false]] }, doTest);
|
||||
|
||||
function doTest() {
|
||||
var ifr = document.createElement('iframe');
|
||||
document.body.appendChild(ifr);
|
||||
ok(true, "didn't assert");
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
Загрузка…
Ссылка в новой задаче