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

Unified Diff: src/isolate.cc

Issue 2555243002: [wasm] Fix location for error in asm.js ToNumber conversion (Closed)
Patch Set: Fix gc error by storing callee_pc_address Created 4 years 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/isolate.h ('k') | src/messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index 10c69ad3ff833aa2cabcd9a46665e6c60a257990..4c4107a83dc320c673ba7e0b4af90cf643173c0e 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -523,9 +523,15 @@ Handle<Object> Isolate::CaptureSimpleStackTrace(Handle<JSReceiver> error_object,
// be a wasm object.
DCHECK(wasm::IsWasmInstance(*instance) || instance->IsUndefined(this));
- int flags = wasm::WasmIsAsmJs(*instance, this)
- ? FrameArray::kIsAsmJsWasmFrame
- : FrameArray::kIsWasmFrame;
+ int flags = 0;
+ if (wasm::WasmIsAsmJs(*instance, this)) {
+ flags |= FrameArray::kIsAsmJsWasmFrame;
+ if (wasm_frame->at_to_number_conversion()) {
+ flags |= FrameArray::kAsmJsAtNumberConversion;
+ }
+ } else {
+ flags |= FrameArray::kIsWasmFrame;
+ }
elements =
FrameArray::AppendWasmFrame(elements, instance, wasm_function_index,
@@ -1557,8 +1563,10 @@ bool Isolate::ComputeLocationFromStackTrace(MessageLocation* target,
int func_index = elements->WasmFunctionIndex(i)->value();
int code_offset = elements->Offset(i)->value();
int byte_pos = elements->Code(i)->SourcePosition(code_offset);
+ bool at_to_number_conversion =
+ elements->Flags(i)->value() & FrameArray::kAsmJsAtNumberConversion;
int source_pos = WasmCompiledModule::GetAsmJsSourcePosition(
- compiled_module, func_index, byte_pos);
+ compiled_module, func_index, byte_pos, at_to_number_conversion);
Handle<Script> script = compiled_module->script();
*target = MessageLocation(script, source_pos, source_pos + 1);
@@ -3037,7 +3045,7 @@ int Isolate::GenerateIdentityHash(uint32_t mask) {
return hash != 0 ? hash : 1;
}
-Object* Isolate::FindCodeObject(Address a) {
+Code* Isolate::FindCodeObject(Address a) {
return inner_pointer_to_code_cache()->GcSafeFindCodeForInnerPointer(a);
}
« no previous file with comments | « src/isolate.h ('k') | src/messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698