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

Side by Side Diff: Source/bindings/core/v8/WorkerScriptController.cpp

Issue 651713002: Oilpan: DOM wrappers don't need to keep persistent handles (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « Source/bindings/core/v8/WindowProxy.cpp ('k') | Source/bindings/core/v8/WrapperTypeInfo.h » ('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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 , m_workerGlobalScope(workerGlobalScope) 109 , m_workerGlobalScope(workerGlobalScope)
110 , m_executionForbidden(false) 110 , m_executionForbidden(false)
111 , m_executionScheduledToTerminate(false) 111 , m_executionScheduledToTerminate(false)
112 , m_globalScopeExecutionState(0) 112 , m_globalScopeExecutionState(0)
113 { 113 {
114 m_isolate = V8PerIsolateData::initialize(); 114 m_isolate = V8PerIsolateData::initialize();
115 V8Initializer::initializeWorker(m_isolate); 115 V8Initializer::initializeWorker(m_isolate);
116 m_world = DOMWrapperWorld::create(WorkerWorldId); 116 m_world = DOMWrapperWorld::create(WorkerWorldId);
117 m_interruptor = adoptPtr(new V8IsolateInterruptor(m_isolate)); 117 m_interruptor = adoptPtr(new V8IsolateInterruptor(m_isolate));
118 ThreadState::current()->addInterruptor(m_interruptor.get()); 118 ThreadState::current()->addInterruptor(m_interruptor.get());
119 ThreadState::current()->registerTraceDOMWrappers(m_isolate, V8GCController:: traceDOMWrappers);
119 } 120 }
120 121
121 // We need to postpone V8 Isolate destruction until the very end of 122 // We need to postpone V8 Isolate destruction until the very end of
122 // worker thread finalization when all objects on the worker heap 123 // worker thread finalization when all objects on the worker heap
123 // are destroyed. 124 // are destroyed.
124 class IsolateCleanupTask : public ThreadState::CleanupTask { 125 class IsolateCleanupTask : public ThreadState::CleanupTask {
125 public: 126 public:
126 static PassOwnPtr<IsolateCleanupTask> create(v8::Isolate* isolate) 127 static PassOwnPtr<IsolateCleanupTask> create(v8::Isolate* isolate)
127 { 128 {
128 return adoptPtr(new IsolateCleanupTask(isolate)); 129 return adoptPtr(new IsolateCleanupTask(isolate));
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 308
308 void WorkerScriptController::rethrowExceptionFromImportedScript(PassRefPtrWillBe RawPtr<ErrorEvent> errorEvent, ExceptionState& exceptionState) 309 void WorkerScriptController::rethrowExceptionFromImportedScript(PassRefPtrWillBe RawPtr<ErrorEvent> errorEvent, ExceptionState& exceptionState)
309 { 310 {
310 const String& errorMessage = errorEvent->message(); 311 const String& errorMessage = errorEvent->message();
311 if (m_globalScopeExecutionState) 312 if (m_globalScopeExecutionState)
312 m_globalScopeExecutionState->m_errorEventFromImportedScript = errorEvent ; 313 m_globalScopeExecutionState->m_errorEventFromImportedScript = errorEvent ;
313 exceptionState.rethrowV8Exception(V8ThrowException::createGeneralError(error Message, m_isolate)); 314 exceptionState.rethrowV8Exception(V8ThrowException::createGeneralError(error Message, m_isolate));
314 } 315 }
315 316
316 } // namespace blink 317 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/WindowProxy.cpp ('k') | Source/bindings/core/v8/WrapperTypeInfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698