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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 } else { | 185 } else { |
186 enteredWindow->document()->reportException(event.release(), scriptId, ca
llStack, accessControlStatus); | 186 enteredWindow->document()->reportException(event.release(), scriptId, ca
llStack, accessControlStatus); |
187 } | 187 } |
188 } | 188 } |
189 | 189 |
190 namespace { | 190 namespace { |
191 | 191 |
192 static RejectedPromises& rejectedPromisesOnMainThread() | 192 static RejectedPromises& rejectedPromisesOnMainThread() |
193 { | 193 { |
194 ASSERT(isMainThread()); | 194 ASSERT(isMainThread()); |
195 DEFINE_STATIC_LOCAL(RefPtrWillBePersistent<RejectedPromises>, rejectedPromis
es, (adoptRefWillBeNoop(new RejectedPromises()))); | 195 DEFINE_STATIC_LOCAL(RefPtrWillBePersistent<RejectedPromises>, rejectedPromis
es, (RejectedPromises::create())); |
196 return *rejectedPromises; | 196 return *rejectedPromises; |
197 } | 197 } |
198 | 198 |
199 } // namespace | 199 } // namespace |
200 | 200 |
201 void V8Initializer::reportRejectedPromisesOnMainThread() | 201 void V8Initializer::reportRejectedPromisesOnMainThread() |
202 { | 202 { |
203 rejectedPromisesOnMainThread().processQueue(); | 203 rejectedPromisesOnMainThread().processQueue(); |
204 } | 204 } |
205 | 205 |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 | 463 |
464 v8::V8::AddMessageListener(messageHandlerInWorker); | 464 v8::V8::AddMessageListener(messageHandlerInWorker); |
465 v8::V8::SetFatalErrorHandler(reportFatalErrorInWorker); | 465 v8::V8::SetFatalErrorHandler(reportFatalErrorInWorker); |
466 | 466 |
467 uint32_t here; | 467 uint32_t here; |
468 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(&here - kWorkerMaxStackSi
ze / sizeof(uint32_t*))); | 468 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(&here - kWorkerMaxStackSi
ze / sizeof(uint32_t*))); |
469 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker); | 469 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker); |
470 } | 470 } |
471 | 471 |
472 } // namespace blink | 472 } // namespace blink |
OLD | NEW |