Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1523)

Unified Diff: test/mjsunit/wasm/asm-wasm-stack.js

Issue 2448833004: [wasm] Fix binary search for asm.js offsets (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/wasm/wasm-debug.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/wasm/asm-wasm-stack.js
diff --git a/test/mjsunit/wasm/asm-wasm-stack.js b/test/mjsunit/wasm/asm-wasm-stack.js
index b7dac31e16c9b38d6a9730bcd25f9c7b542b63df..be728394eacab46bd5f332d92c81ba940e0c419c 100644
--- a/test/mjsunit/wasm/asm-wasm-stack.js
+++ b/test/mjsunit/wasm/asm-wasm-stack.js
@@ -49,8 +49,13 @@ function generateWasmFromAsmJs(stdlib, foreign, heap) {
function callThrow() {
throwFunc();
}
- function redirectFun() {
- callThrow();
+ function redirectFun(i) {
+ i = i|0;
+ switch (i|0) {
+ case 0: callThrow(); break;
+ case 1: redirectFun(0); break;
+ case 2: redirectFun(1); break;
+ }
}
return redirectFun;
}
@@ -59,7 +64,7 @@ function generateWasmFromAsmJs(stdlib, foreign, heap) {
var fun = generateWasmFromAsmJs(this, {throwFunc: throwException}, undefined);
var e = null;
try {
- fun();
+ fun(0);
} catch (ex) {
e = ex;
}
@@ -68,9 +73,9 @@ function generateWasmFromAsmJs(stdlib, foreign, heap) {
'^Error: exception from JS$',
'^ *at throwException \\(' + filename + ':43:9\\)$',
'^ *at callThrow \\(' + filename + ':50:5\\)$',
- '^ *at redirectFun \\(' + filename + ':53:5\\)$',
- '^ *at PreformattedStackTraceFromJS \\(' + filename + ':62:5\\)$',
- '^ *at ' + filename + ':75:3$'
+ '^ *at redirectFun \\(' + filename + ':55:15\\)$',
+ '^ *at PreformattedStackTraceFromJS \\(' + filename + ':67:5\\)$',
+ '^ *at ' + filename + ':80:3$'
]);
})();
@@ -83,7 +88,7 @@ Error.prepareStackTrace = function(error, frames) {
var fun = generateWasmFromAsmJs(this, {throwFunc: throwException}, undefined);
var e = null;
try {
- fun();
+ fun(2);
} catch (ex) {
e = ex;
}
@@ -91,8 +96,10 @@ Error.prepareStackTrace = function(error, frames) {
checkFunctionsOnCallsites(e, [
['throwException', 43, 9], // --
['callThrow', 50, 5], // --
- ['redirectFun', 53, 5], // --
- ['CallsiteObjectsFromJS', 86, 5], // --
- [null, 98, 3]
+ ['redirectFun', 55, 15], // --
+ ['redirectFun', 56, 15], // --
+ ['redirectFun', 57, 15], // --
+ ['CallsiteObjectsFromJS', 91, 5], // --
+ [null, 105, 3]
]);
})();
« no previous file with comments | « src/wasm/wasm-debug.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698