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

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

Issue 2735973006: Bindings: Separate WorldIdConstants into WorldTypes and WorldId (Closed)
Patch Set: rebase Created 3 years, 9 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
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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 =
107 DOMWrapperWorld::create(isolate, DOMWrapperWorld::WorldType::Worker);
107 } 108 }
108 109
109 WorkerOrWorkletScriptController::~WorkerOrWorkletScriptController() { 110 WorkerOrWorkletScriptController::~WorkerOrWorkletScriptController() {
110 ASSERT(!m_rejectedPromises); 111 ASSERT(!m_rejectedPromises);
111 } 112 }
112 113
113 void WorkerOrWorkletScriptController::dispose() { 114 void WorkerOrWorkletScriptController::dispose() {
114 m_rejectedPromises->dispose(); 115 m_rejectedPromises->dispose();
115 m_rejectedPromises.release(); 116 m_rejectedPromises.release();
116 117
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 m_executionState->m_errorEventFromImportedScript = errorEvent; 354 m_executionState->m_errorEventFromImportedScript = errorEvent;
354 exceptionState.rethrowV8Exception( 355 exceptionState.rethrowV8Exception(
355 V8ThrowException::createError(m_isolate, errorMessage)); 356 V8ThrowException::createError(m_isolate, errorMessage));
356 } 357 }
357 358
358 DEFINE_TRACE(WorkerOrWorkletScriptController) { 359 DEFINE_TRACE(WorkerOrWorkletScriptController) {
359 visitor->trace(m_globalScope); 360 visitor->trace(m_globalScope);
360 } 361 }
361 362
362 } // namespace blink 363 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698