| 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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 v8::Isolate* isolate = promise->GetIsolate(); | 265 v8::Isolate* isolate = promise->GetIsolate(); |
| 266 ScriptState* scriptState = ScriptState::current(isolate); | 266 ScriptState* scriptState = ScriptState::current(isolate); |
| 267 if (!scriptState->contextIsValid()) | 267 if (!scriptState->contextIsValid()) |
| 268 return; | 268 return; |
| 269 | 269 |
| 270 ExecutionContext* executionContext = scriptState->executionContext(); | 270 ExecutionContext* executionContext = scriptState->executionContext(); |
| 271 if (!executionContext) | 271 if (!executionContext) |
| 272 return; | 272 return; |
| 273 | 273 |
| 274 ASSERT(executionContext->isWorkerGlobalScope()); | 274 ASSERT(executionContext->isWorkerGlobalScope()); |
| 275 WorkerScriptController* scriptController = toWorkerGlobalScope(executionCont
ext)->script(); | 275 WorkerScriptController* scriptController = toWorkerGlobalScope(executionCont
ext)->scriptController(); |
| 276 ASSERT(scriptController); | 276 ASSERT(scriptController); |
| 277 | 277 |
| 278 if (data.GetEvent() == v8::kPromiseHandlerAddedAfterReject) { | 278 if (data.GetEvent() == v8::kPromiseHandlerAddedAfterReject) { |
| 279 scriptController->rejectedPromises()->handlerAdded(data); | 279 scriptController->rejectedPromises()->handlerAdded(data); |
| 280 return; | 280 return; |
| 281 } | 281 } |
| 282 | 282 |
| 283 ASSERT(data.GetEvent() == v8::kPromiseRejectWithNoHandler); | 283 ASSERT(data.GetEvent() == v8::kPromiseRejectWithNoHandler); |
| 284 | 284 |
| 285 int scriptId = 0; | 285 int scriptId = 0; |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 470 | 470 |
| 471 v8::V8::AddMessageListener(messageHandlerInWorker); | 471 v8::V8::AddMessageListener(messageHandlerInWorker); |
| 472 v8::V8::SetFatalErrorHandler(reportFatalErrorInWorker); | 472 v8::V8::SetFatalErrorHandler(reportFatalErrorInWorker); |
| 473 | 473 |
| 474 uint32_t here; | 474 uint32_t here; |
| 475 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(&here - kWorkerMaxStackSi
ze / sizeof(uint32_t*))); | 475 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(&here - kWorkerMaxStackSi
ze / sizeof(uint32_t*))); |
| 476 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker); | 476 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker); |
| 477 } | 477 } |
| 478 | 478 |
| 479 } // namespace blink | 479 } // namespace blink |
| OLD | NEW |