| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 m_isolate->Exit(); | 89 m_isolate->Exit(); |
| 90 m_isolate->Dispose(); | 90 m_isolate->Dispose(); |
| 91 } | 91 } |
| 92 | 92 |
| 93 private: | 93 private: |
| 94 explicit IsolateCleanupTask(v8::Isolate* isolate) : m_isolate(isolate) { } | 94 explicit IsolateCleanupTask(v8::Isolate* isolate) : m_isolate(isolate) { } |
| 95 | 95 |
| 96 v8::Isolate* m_isolate; | 96 v8::Isolate* m_isolate; |
| 97 }; | 97 }; |
| 98 | 98 |
| 99 void WorkerScriptController::dispose() |
| 100 { |
| 101 m_world->dispose(); |
| 102 } |
| 103 |
| 99 WorkerScriptController::~WorkerScriptController() | 104 WorkerScriptController::~WorkerScriptController() |
| 100 { | 105 { |
| 101 ThreadState::current()->removeInterruptor(m_interruptor.get()); | 106 ThreadState::current()->removeInterruptor(m_interruptor.get()); |
| 102 | 107 |
| 103 m_world->dispose(); | |
| 104 | |
| 105 // The corresponding call to didStartWorkerRunLoop is in | 108 // The corresponding call to didStartWorkerRunLoop is in |
| 106 // WorkerThread::workerThread(). | 109 // WorkerThread::workerThread(). |
| 107 // See http://webkit.org/b/83104#c14 for why this is here. | 110 // See http://webkit.org/b/83104#c14 for why this is here. |
| 108 blink::Platform::current()->didStopWorkerRunLoop(blink::WebWorkerRunLoop(&m_
workerGlobalScope.thread()->runLoop())); | 111 blink::Platform::current()->didStopWorkerRunLoop(blink::WebWorkerRunLoop(&m_
workerGlobalScope.thread()->runLoop())); |
| 109 | 112 |
| 110 disposeContext(); | 113 disposeContext(); |
| 111 | 114 |
| 112 ThreadState::current()->addCleanupTask(IsolateCleanupTask::create(m_isolate)
); | 115 ThreadState::current()->addCleanupTask(IsolateCleanupTask::create(m_isolate)
); |
| 113 } | 116 } |
| 114 | 117 |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 m_disableEvalPending = errorMessage; | 260 m_disableEvalPending = errorMessage; |
| 258 } | 261 } |
| 259 | 262 |
| 260 void WorkerScriptController::rethrowExceptionFromImportedScript(PassRefPtr<Error
Event> errorEvent) | 263 void WorkerScriptController::rethrowExceptionFromImportedScript(PassRefPtr<Error
Event> errorEvent) |
| 261 { | 264 { |
| 262 m_errorEventFromImportedScript = errorEvent; | 265 m_errorEventFromImportedScript = errorEvent; |
| 263 throwError(V8ThrowException::createError(v8GeneralError, m_errorEventFromImp
ortedScript->message(), m_isolate), m_isolate); | 266 throwError(V8ThrowException::createError(v8GeneralError, m_errorEventFromImp
ortedScript->message(), m_isolate), m_isolate); |
| 264 } | 267 } |
| 265 | 268 |
| 266 } // namespace WebCore | 269 } // namespace WebCore |
| OLD | NEW |