зеркало из https://github.com/mozilla/gecko-dev.git
Bug 601299: Find RegExpStatics in cx->globalObject if necessary. (r=mrbkap)
This commit is contained in:
Родитель
73c2fc7349
Коммит
66ec65e17e
|
@ -51,14 +51,7 @@
|
|||
inline js::RegExpStatics *
|
||||
JSContext::regExpStatics()
|
||||
{
|
||||
VOUCH_HAVE_STACK();
|
||||
/*
|
||||
* Whether we're on trace or not, the scope chain associated with cx->fp
|
||||
* will lead us to the appropriate global. Although cx->fp is stale on
|
||||
* trace, trace execution never crosses globals.
|
||||
*/
|
||||
JS_ASSERT(hasfp());
|
||||
JSObject *global = fp()->scopeChain().getGlobal();
|
||||
JSObject *global = JS_GetGlobalForScopeChain(this);
|
||||
js::RegExpStatics *res = js::RegExpStatics::extractFrom(global);
|
||||
return res;
|
||||
}
|
||||
|
|
|
@ -75,6 +75,7 @@ _TEST_FILES = bug500931_helper.html \
|
|||
test_bug589028.html \
|
||||
bug589028_helper.html \
|
||||
test_bug605167.html \
|
||||
test_bug601299.html \
|
||||
$(NULL)
|
||||
|
||||
#test_bug484107.html \
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=601299
|
||||
-->
|
||||
<script>
|
||||
window.setTimeout(RegExp, 0);
|
||||
</script>
|
||||
</html>
|
Загрузка…
Ссылка в новой задаче