OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2012 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 | 96 |
97 WorkerOrWorkletScriptController::WorkerOrWorkletScriptController( | 97 WorkerOrWorkletScriptController::WorkerOrWorkletScriptController( |
98 WorkerOrWorkletGlobalScope* globalScope, | 98 WorkerOrWorkletGlobalScope* globalScope, |
99 v8::Isolate* isolate) | 99 v8::Isolate* isolate) |
100 : m_globalScope(globalScope), | 100 : m_globalScope(globalScope), |
101 m_isolate(isolate), | 101 m_isolate(isolate), |
102 m_executionForbidden(false), | 102 m_executionForbidden(false), |
103 m_rejectedPromises(RejectedPromises::create()), | 103 m_rejectedPromises(RejectedPromises::create()), |
104 m_executionState(0) { | 104 m_executionState(0) { |
105 ASSERT(isolate); | 105 ASSERT(isolate); |
106 m_world = DOMWrapperWorld::create(isolate, WorkerWorldId); | 106 m_world = DOMWrapperWorld::create(isolate, WorldType::Worker); |
107 } | 107 } |
108 | 108 |
109 WorkerOrWorkletScriptController::~WorkerOrWorkletScriptController() { | 109 WorkerOrWorkletScriptController::~WorkerOrWorkletScriptController() { |
110 ASSERT(!m_rejectedPromises); | 110 ASSERT(!m_rejectedPromises); |
111 } | 111 } |
112 | 112 |
113 void WorkerOrWorkletScriptController::dispose() { | 113 void WorkerOrWorkletScriptController::dispose() { |
114 m_rejectedPromises->dispose(); | 114 m_rejectedPromises->dispose(); |
115 m_rejectedPromises.release(); | 115 m_rejectedPromises.release(); |
116 | 116 |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 m_executionState->m_errorEventFromImportedScript = errorEvent; | 353 m_executionState->m_errorEventFromImportedScript = errorEvent; |
354 exceptionState.rethrowV8Exception( | 354 exceptionState.rethrowV8Exception( |
355 V8ThrowException::createError(m_isolate, errorMessage)); | 355 V8ThrowException::createError(m_isolate, errorMessage)); |
356 } | 356 } |
357 | 357 |
358 DEFINE_TRACE(WorkerOrWorkletScriptController) { | 358 DEFINE_TRACE(WorkerOrWorkletScriptController) { |
359 visitor->trace(m_globalScope); | 359 visitor->trace(m_globalScope); |
360 } | 360 } |
361 | 361 |
362 } // namespace blink | 362 } // namespace blink |
OLD | NEW |