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

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

Issue 10232019: Merge 113818 - Notify observers of WorkerRunLoop stopping before the V8 isolate dies. (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 years, 8 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 V8BindingPerIsolateData* data = V8BindingPerIsolateData::create(m_isolate); 58 V8BindingPerIsolateData* data = V8BindingPerIsolateData::create(m_isolate);
59 data->allStores().append(&m_DOMDataStore); 59 data->allStores().append(&m_DOMDataStore);
60 data->setDOMDataStore(&m_DOMDataStore); 60 data->setDOMDataStore(&m_DOMDataStore);
61 m_isolate->Enter(); 61 m_isolate->Enter();
62 m_proxy = adoptPtr(new WorkerContextExecutionProxy(workerContext)); 62 m_proxy = adoptPtr(new WorkerContextExecutionProxy(workerContext));
63 } 63 }
64 64
65 WorkerScriptController::~WorkerScriptController() 65 WorkerScriptController::~WorkerScriptController()
66 { 66 {
67 removeAllDOMObjects(); 67 removeAllDOMObjects();
68 #if PLATFORM(CHROMIUM)
69 // The corresponding call to didStartWorkerRunLoop is in
70 // WorkerThread::workerThread().
71 // See http://webkit.org/b/83104#c14 for why this is here.
72 PlatformSupport::didStopWorkerRunLoop(&m_workerContext->thread()->runLoop()) ;
73 #endif
68 m_proxy.clear(); 74 m_proxy.clear();
69 m_isolate->Exit(); 75 m_isolate->Exit();
70 V8BindingPerIsolateData::dispose(m_isolate); 76 V8BindingPerIsolateData::dispose(m_isolate);
71 m_isolate->Dispose(); 77 m_isolate->Dispose();
72 } 78 }
73 79
74 void WorkerScriptController::evaluate(const ScriptSourceCode& sourceCode) 80 void WorkerScriptController::evaluate(const ScriptSourceCode& sourceCode)
75 { 81 {
76 evaluate(sourceCode, 0); 82 evaluate(sourceCode, 0);
77 } 83 }
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 // Return 0 if the current executing context is not the worker context. 148 // Return 0 if the current executing context is not the worker context.
143 if (global.IsEmpty()) 149 if (global.IsEmpty())
144 return 0; 150 return 0;
145 WorkerContext* workerContext = V8WorkerContext::toNative(global); 151 WorkerContext* workerContext = V8WorkerContext::toNative(global);
146 return workerContext->script(); 152 return workerContext->script();
147 } 153 }
148 154
149 } // namespace WebCore 155 } // namespace WebCore
150 156
151 #endif // ENABLE(WORKERS) 157 #endif // ENABLE(WORKERS)
OLDNEW
« no previous file with comments | « LayoutTests/storage/indexeddb/resources/pending-version-change-on-exit.js ('k') | Source/WebCore/workers/WorkerThread.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698