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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 EventDispatchForbiddenScope::AllowUserAgentEvents allowUserAgentEvents; | 154 EventDispatchForbiddenScope::AllowUserAgentEvents allowUserAgentEvents; |
155 enteredWindow->document()->reportException(event.release(), scriptId, ca
llStack, corsStatus); | 155 enteredWindow->document()->reportException(event.release(), scriptId, ca
llStack, corsStatus); |
156 } else { | 156 } else { |
157 enteredWindow->document()->reportException(event.release(), scriptId, ca
llStack, corsStatus); | 157 enteredWindow->document()->reportException(event.release(), scriptId, ca
llStack, corsStatus); |
158 } | 158 } |
159 } | 159 } |
160 | 160 |
161 namespace { | 161 namespace { |
162 | 162 |
163 class PromiseRejectMessage { | 163 class PromiseRejectMessage { |
| 164 ALLOW_ONLY_INLINE_ALLOCATION(); |
164 public: | 165 public: |
165 PromiseRejectMessage(const ScriptValue& promise, PassRefPtrWillBeRawPtr<Scri
ptCallStack> callStack) | 166 PromiseRejectMessage(const ScriptValue& promise, PassRefPtrWillBeRawPtr<Scri
ptCallStack> callStack) |
166 : m_promise(promise) | 167 : m_promise(promise) |
167 , m_callStack(callStack) | 168 , m_callStack(callStack) |
168 { | 169 { |
169 } | 170 } |
170 | 171 |
171 const ScriptValue m_promise; | 172 const ScriptValue m_promise; |
172 const RefPtrWillBeMember<ScriptCallStack> m_callStack; | 173 const RefPtrWillBeMember<ScriptCallStack> m_callStack; |
| 174 |
| 175 void trace(Visitor* visitor) |
| 176 { |
| 177 visitor->trace(m_callStack); |
| 178 } |
173 }; | 179 }; |
174 | 180 |
175 } // namespace | 181 } // namespace |
176 | 182 |
177 typedef WillBeHeapDeque<PromiseRejectMessage> PromiseRejectMessageQueue; | 183 typedef WillBeHeapDeque<PromiseRejectMessage> PromiseRejectMessageQueue; |
178 | 184 |
179 static PromiseRejectMessageQueue& promiseRejectMessageQueue() | 185 static PromiseRejectMessageQueue& promiseRejectMessageQueue() |
180 { | 186 { |
181 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<PromiseRejectMessageQueue>, queue
, (adoptPtrWillBeNoop(new PromiseRejectMessageQueue()))); | 187 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<PromiseRejectMessageQueue>, queue
, (adoptPtrWillBeNoop(new PromiseRejectMessageQueue()))); |
182 return *queue; | 188 return *queue; |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 initializeV8Common(isolate); | 370 initializeV8Common(isolate); |
365 | 371 |
366 v8::V8::AddMessageListener(messageHandlerInWorker); | 372 v8::V8::AddMessageListener(messageHandlerInWorker); |
367 v8::V8::SetFatalErrorHandler(reportFatalErrorInWorker); | 373 v8::V8::SetFatalErrorHandler(reportFatalErrorInWorker); |
368 | 374 |
369 uint32_t here; | 375 uint32_t here; |
370 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(&here - kWorkerMaxStackSi
ze / sizeof(uint32_t*))); | 376 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(&here - kWorkerMaxStackSi
ze / sizeof(uint32_t*))); |
371 } | 377 } |
372 | 378 |
373 } // namespace blink | 379 } // namespace blink |
OLD | NEW |