| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 // the error event from the v8::Message, quietly leave. | 481 // the error event from the v8::Message, quietly leave. |
| 482 if (!isolate->IsExecutionTerminating()) { | 482 if (!isolate->IsExecutionTerminating()) { |
| 483 V8ErrorHandler::storeExceptionOnErrorEventWrapper( | 483 V8ErrorHandler::storeExceptionOnErrorEventWrapper( |
| 484 scriptState, event, data, scriptState->context()->Global()); | 484 scriptState, event, data, scriptState->context()->Global()); |
| 485 scriptState->getExecutionContext()->dispatchErrorEvent(event, corsStatus); | 485 scriptState->getExecutionContext()->dispatchErrorEvent(event, corsStatus); |
| 486 } | 486 } |
| 487 | 487 |
| 488 perIsolateData->setReportingException(false); | 488 perIsolateData->setReportingException(false); |
| 489 } | 489 } |
| 490 | 490 |
| 491 static const int kWorkerMaxStackSize = 500 * 1024; | |
| 492 | |
| 493 // This function uses a local stack variable to determine the isolate's stack | |
| 494 // limit. AddressSanitizer may relocate that local variable to a fake stack, | |
| 495 // which may lead to problems during JavaScript execution. Therefore we disable | |
| 496 // AddressSanitizer for V8Initializer::initializeWorker(). | |
| 497 NO_SANITIZE_ADDRESS | |
| 498 void V8Initializer::initializeWorker(v8::Isolate* isolate) { | 491 void V8Initializer::initializeWorker(v8::Isolate* isolate) { |
| 499 initializeV8Common(isolate); | 492 initializeV8Common(isolate); |
| 500 | 493 |
| 501 isolate->AddMessageListener(messageHandlerInWorker); | 494 isolate->AddMessageListener(messageHandlerInWorker); |
| 502 isolate->SetFatalErrorHandler(reportFatalErrorInWorker); | 495 isolate->SetFatalErrorHandler(reportFatalErrorInWorker); |
| 503 | |
| 504 uint32_t here; | |
| 505 isolate->SetStackLimit(reinterpret_cast<uintptr_t>( | |
| 506 &here - kWorkerMaxStackSize / sizeof(uint32_t*))); | |
| 507 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker); | 496 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker); |
| 508 } | 497 } |
| 509 | 498 |
| 510 } // namespace blink | 499 } // namespace blink |
| OLD | NEW |