зеркало из https://github.com/mozilla/gecko-dev.git
Bug 621432 - Properly reconstruct the pcstack when decompiling for an exception thrown during script prolog execution. r=jorendorff, a=beltzner
--HG-- extra : rebase_source : ed51ace3c3c045441ea2314e54cb458261d40f19
This commit is contained in:
Родитель
7ce1ece928
Коммит
96fdc3dfd9
|
@ -5489,8 +5489,8 @@ ReconstructPCStack(JSContext *cx, JSScript *script, jsbytecode *target,
|
||||||
return ReconstructImacroPCStack(cx, script, imacstart, target, pcstack);
|
return ReconstructImacroPCStack(cx, script, imacstart, target, pcstack);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
LOCAL_ASSERT(script->main <= target && target < script->code + script->length);
|
LOCAL_ASSERT(script->code <= target && target < script->code + script->length);
|
||||||
jsbytecode *pc = script->main;
|
jsbytecode *pc = script->code;
|
||||||
uintN pcdepth = 0;
|
uintN pcdepth = 0;
|
||||||
ptrdiff_t oplen;
|
ptrdiff_t oplen;
|
||||||
for (; pc < target; pc += oplen) {
|
for (; pc < target; pc += oplen) {
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
// Any copyright is dedicated to the Public Domain.
|
||||||
|
// http://creativecommons.org/licenses/publicdomain/
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
var BUGNUMBER = 621432;
|
||||||
|
var summary =
|
||||||
|
"If a var statement can't create a global property because the global " +
|
||||||
|
"object isn't extensible, and an error is thrown while decompiling the " +
|
||||||
|
"global, don't assert";
|
||||||
|
|
||||||
|
print(BUGNUMBER + ": " + summary);
|
||||||
|
|
||||||
|
/**************
|
||||||
|
* BEGIN TEST *
|
||||||
|
**************/
|
||||||
|
|
||||||
|
var toSource = [];
|
||||||
|
Object.preventExtensions(this);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
eval("var x;");
|
||||||
|
throw new Error("no error thrown");
|
||||||
|
}
|
||||||
|
catch (e)
|
||||||
|
{
|
||||||
|
assertEq(e instanceof TypeError, true, "expected TypeError, got: " + e);
|
||||||
|
}
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
|
||||||
|
if (typeof reportCompare === "function")
|
||||||
|
reportCompare(true, true);
|
||||||
|
|
||||||
|
print("All tests passed!");
|
|
@ -1,4 +1,5 @@
|
||||||
url-prefix ../../jsreftest.html?test=ecma_5/Global/
|
url-prefix ../../jsreftest.html?test=ecma_5/Global/
|
||||||
|
script adding-global-var-nonextensible-error.js
|
||||||
script parseInt-01.js
|
script parseInt-01.js
|
||||||
script parseFloat-01.js
|
script parseFloat-01.js
|
||||||
script eval-01.js
|
script eval-01.js
|
||||||
|
|
Загрузка…
Ссылка в новой задаче