| Index: src/api.cc
|
| diff --git a/src/api.cc b/src/api.cc
|
| index a9a17b458bb45330d0a903598b181c51decb5c30..b3a5c49a103c8dc3661b8c0ba643603ce89c181a 100644
|
| --- a/src/api.cc
|
| +++ b/src/api.cc
|
| @@ -399,6 +399,18 @@ void Utils::ReportOOMFailure(const char* location, bool is_heap_oom) {
|
| isolate->SignalFatalError();
|
| }
|
|
|
| +void Utils::ReportAsmJsWarning(i::Handle<i::JSMessageObject> message) {
|
| + 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 +8436,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);
|
|
|