| 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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 return; | 281 return; |
| 282 | 282 |
| 283 ExecutionContext* executionContext = scriptState->getExecutionContext(); | 283 ExecutionContext* executionContext = scriptState->getExecutionContext(); |
| 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)->scriptController(); | 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->getRejectedPromises(), 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) |
| 299 return; | 299 return; |
| 300 DOMWindow* targetWindow = target->domWindow(); | 300 DOMWindow* targetWindow = target->domWindow(); |
| 301 | 301 |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 | 447 |
| 448 isolate->AddMessageListener(messageHandlerInWorker); | 448 isolate->AddMessageListener(messageHandlerInWorker); |
| 449 isolate->SetFatalErrorHandler(reportFatalErrorInWorker); | 449 isolate->SetFatalErrorHandler(reportFatalErrorInWorker); |
| 450 | 450 |
| 451 uint32_t here; | 451 uint32_t here; |
| 452 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(&here - kWorkerMaxStackSi
ze / sizeof(uint32_t*))); | 452 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(&here - kWorkerMaxStackSi
ze / sizeof(uint32_t*))); |
| 453 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker); | 453 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker); |
| 454 } | 454 } |
| 455 | 455 |
| 456 } // namespace blink | 456 } // namespace blink |
| OLD | NEW |