Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(603)

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/WorkerOrWorkletScriptController.cpp

Issue 2254593002: [worklets] Introduce AnimationWorkletGlobalScope and ThreadedWorkletGlobalScope (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add super call to WorkletGlobalScope::dispose() Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/scripts/v8_utilities.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 } 178 }
179 if (context.IsEmpty()) 179 if (context.IsEmpty())
180 return false; 180 return false;
181 181
182 m_scriptState = ScriptState::create(context, m_world); 182 m_scriptState = ScriptState::create(context, m_world);
183 183
184 ScriptState::Scope scope(m_scriptState.get()); 184 ScriptState::Scope scope(m_scriptState.get());
185 185
186 // Name new context for debugging. For main thread worklet global scopes 186 // Name new context for debugging. For main thread worklet global scopes
187 // this is done once the context is initialized. 187 // this is done once the context is initialized.
188 if (m_globalScope->isWorkerGlobalScope()) { 188 if (m_globalScope->isWorkerGlobalScope() || m_globalScope->isThreadedWorklet GlobalScope()) {
189 WorkerThreadDebugger* debugger = WorkerThreadDebugger::from(m_isolate); 189 WorkerThreadDebugger* debugger = WorkerThreadDebugger::from(m_isolate);
190 if (debugger) 190 if (debugger)
191 debugger->contextCreated(context); 191 debugger->contextCreated(context);
192 } 192 }
193 193
194 // The global proxy object. Note this is not the global object. 194 // The global proxy object. Note this is not the global object.
195 v8::Local<v8::Object> globalProxy = context->Global(); 195 v8::Local<v8::Object> globalProxy = context->Global();
196 // The global object, aka worker/worklet wrapper object. 196 // The global object, aka worker/worklet wrapper object.
197 v8::Local<v8::Object> globalObject = globalProxy->GetPrototype().As<v8::Obje ct>(); 197 v8::Local<v8::Object> globalObject = globalProxy->GetPrototype().As<v8::Obje ct>();
198 globalObject = V8DOMWrapper::associateObjectWithWrapper(m_isolate, scriptWra ppable, wrapperTypeInfo, globalObject); 198 globalObject = V8DOMWrapper::associateObjectWithWrapper(m_isolate, scriptWra ppable, wrapperTypeInfo, globalObject);
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 m_executionState->m_errorEventFromImportedScript = errorEvent; 318 m_executionState->m_errorEventFromImportedScript = errorEvent;
319 exceptionState.rethrowV8Exception(V8ThrowException::createError(m_isolate, e rrorMessage)); 319 exceptionState.rethrowV8Exception(V8ThrowException::createError(m_isolate, e rrorMessage));
320 } 320 }
321 321
322 DEFINE_TRACE(WorkerOrWorkletScriptController) 322 DEFINE_TRACE(WorkerOrWorkletScriptController)
323 { 323 {
324 visitor->trace(m_globalScope); 324 visitor->trace(m_globalScope);
325 } 325 }
326 326
327 } // namespace blink 327 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/scripts/v8_utilities.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698