Chromium Code Reviews| Index: src/api.cc |
| diff --git a/src/api.cc b/src/api.cc |
| index a9a17b458bb45330d0a903598b181c51decb5c30..a63703531028c81c32030689a7f8fad8fdf601b8 100644 |
| --- a/src/api.cc |
| +++ b/src/api.cc |
| @@ -399,6 +399,21 @@ void Utils::ReportOOMFailure(const char* location, bool is_heap_oom) { |
| isolate->SignalFatalError(); |
| } |
| +void Utils::ReportAsmJsWarning(i::Handle<i::JSMessageObject> message) { |
| + if (i::FLAG_disable_asm_warnings) { |
|
Benedikt Meurer
2016/11/23 08:41:31
Is this flag really useful? If you don't want the
bradn
2016/11/23 08:46:18
machenbach, how is the correctness fuzzer set up?
Michael Achenbach
2016/11/23 09:01:22
It runs d8. But maybe already https://codereview.c
bradn
2016/11/23 09:10:55
Ok.
Dropped until we know we need it.
|
| + return; |
| + } |
| + i::Isolate* isolate = i::Isolate::Current(); |
| + AsmJsWarningCallback asmjs_warning_callback = |
| + isolate->asmjs_warning_behavior(); |
| + if (asmjs_warning_callback == nullptr) { |
| + v8::internal::PrintF( |
| + "%s\n", i::MessageHandler::GetLocalizedMessage(isolate, message).get()); |
| + } else { |
| + asmjs_warning_callback(MessageToLocal(message)); |
| + } |
| +} |
| + |
| static inline bool IsExecutionTerminatingCheck(i::Isolate* isolate) { |
| if (isolate->has_scheduled_exception()) { |
| return isolate->scheduled_exception() == |
| @@ -8424,6 +8439,11 @@ void Isolate::SetOOMErrorHandler(OOMErrorCallback that) { |
| isolate->set_oom_behavior(that); |
| } |
| +void Isolate::SetAsmJsWarningHandler(AsmJsWarningCallback that) { |
| + i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
| + isolate->set_asmjs_warning_behavior(that); |
| +} |
| + |
| void Isolate::SetAllowCodeGenerationFromStringsCallback( |
| AllowCodeGenerationFromStringsCallback callback) { |
| i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |