| 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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 v8::Isolate* isolate = promise->GetIsolate(); | 278 v8::Isolate* isolate = promise->GetIsolate(); |
| 279 ScriptState* scriptState = ScriptState::current(isolate); | 279 ScriptState* scriptState = ScriptState::current(isolate); |
| 280 if (!scriptState->contextIsValid()) | 280 if (!scriptState->contextIsValid()) |
| 281 return; | 281 return; |
| 282 | 282 |
| 283 ExecutionContext* executionContext = scriptState->executionContext(); | 283 ExecutionContext* executionContext = scriptState->executionContext(); |
| 284 if (!executionContext) | 284 if (!executionContext) |
| 285 return; | 285 return; |
| 286 | 286 |
| 287 ASSERT(executionContext->isWorkerGlobalScope()); | 287 ASSERT(executionContext->isWorkerGlobalScope()); |
| 288 WorkerOrWorkletScriptController* scriptController = toWorkerGlobalScope(exec
utionContext)->script(); | 288 WorkerOrWorkletScriptController* scriptController = toWorkerGlobalScope(exec
utionContext)->scriptController(); |
| 289 ASSERT(scriptController); | 289 ASSERT(scriptController); |
| 290 | 290 |
| 291 promiseRejectHandler(data, *scriptController->rejectedPromises(), String()); | 291 promiseRejectHandler(data, *scriptController->rejectedPromises(), String()); |
| 292 } | 292 } |
| 293 | 293 |
| 294 static void failedAccessCheckCallbackInMainThread(v8::Local<v8::Object> host, v8
::AccessType type, v8::Local<v8::Value> data) | 294 static void failedAccessCheckCallbackInMainThread(v8::Local<v8::Object> host, v8
::AccessType type, v8::Local<v8::Value> data) |
| 295 { | 295 { |
| 296 v8::Isolate* isolate = v8::Isolate::GetCurrent(); | 296 v8::Isolate* isolate = v8::Isolate::GetCurrent(); |
| 297 Frame* target = findFrame(isolate, host, data); | 297 Frame* target = findFrame(isolate, host, data); |
| 298 if (!target) | 298 if (!target) |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 | 439 |
| 440 isolate->AddMessageListener(messageHandlerInWorker); | 440 isolate->AddMessageListener(messageHandlerInWorker); |
| 441 isolate->SetFatalErrorHandler(reportFatalErrorInWorker); | 441 isolate->SetFatalErrorHandler(reportFatalErrorInWorker); |
| 442 | 442 |
| 443 uint32_t here; | 443 uint32_t here; |
| 444 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(&here - kWorkerMaxStackSi
ze / sizeof(uint32_t*))); | 444 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(&here - kWorkerMaxStackSi
ze / sizeof(uint32_t*))); |
| 445 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker); | 445 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker); |
| 446 } | 446 } |
| 447 | 447 |
| 448 } // namespace blink | 448 } // namespace blink |
| OLD | NEW |