| OLD | NEW |
| 1 // Copyright (c) 2009, Google Inc. | 1 // Copyright (c) 2009, Google Inc. |
| 2 // All rights reserved. | 2 // 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 DART_RECORD_TIMER(" createDOMEnabledIsolate took"); | 227 DART_RECORD_TIMER(" createDOMEnabledIsolate took"); |
| 228 return newIsolate; | 228 return newIsolate; |
| 229 } | 229 } |
| 230 | 230 |
| 231 void DartController::shutdownIsolate(Dart_Isolate isolate) | 231 void DartController::shutdownIsolate(Dart_Isolate isolate) |
| 232 { | 232 { |
| 233 DartDOMData* domData = DartDOMData::current(); | 233 DartDOMData* domData = DartDOMData::current(); |
| 234 ASSERT(domData->isDOMEnabled()); | 234 ASSERT(domData->isDOMEnabled()); |
| 235 // If the following assert triggers, we have hit dartbug.com/14183 | 235 // If the following assert triggers, we have hit dartbug.com/14183 |
| 236 // FIXME: keep the isolate alive until the recursion level is 0. | 236 // FIXME: keep the isolate alive until the recursion level is 0. |
| 237 ASSERT(!*(domData->recursion())); | 237 ASSERT(!domData->stackTraceTimestampTracker()->recursionLevel()); |
| 238 DartScriptDebugServer::shared().unregisterIsolate(isolate, m_frame->page()); | 238 DartScriptDebugServer::shared().unregisterIsolate(isolate, m_frame->page()); |
| 239 DartIsolateDestructionObservers* observers = domData->isolateDestructionObse
rvers(); | 239 DartIsolateDestructionObservers* observers = domData->isolateDestructionObse
rvers(); |
| 240 for (DartIsolateDestructionObservers::iterator it = observers->begin(); it !
= observers->end(); ++it) | 240 for (DartIsolateDestructionObservers::iterator it = observers->begin(); it !
= observers->end(); ++it) |
| 241 (*it)->isolateDestroyed(); | 241 (*it)->isolateDestroyed(); |
| 242 Dart_ShutdownIsolate(); | 242 Dart_ShutdownIsolate(); |
| 243 delete domData; | 243 delete domData; |
| 244 } | 244 } |
| 245 | 245 |
| 246 DartController::DartController(LocalFrame* frame) | 246 DartController::DartController(LocalFrame* frame) |
| 247 : m_frame(frame) | 247 : m_frame(frame) |
| (...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 932 Dart_ExitIsolate(); | 932 Dart_ExitIsolate(); |
| 933 loader->processSingleRequest(isolate, url, callback); | 933 loader->processSingleRequest(isolate, url, callback); |
| 934 | 934 |
| 935 // Restore caller isolate. | 935 // Restore caller isolate. |
| 936 Dart_EnterIsolate(caller); | 936 Dart_EnterIsolate(caller); |
| 937 | 937 |
| 938 // FIXME: We need some way to return a Dart_Handle to the isolate we just cr
eated. | 938 // FIXME: We need some way to return a Dart_Handle to the isolate we just cr
eated. |
| 939 } | 939 } |
| 940 | 940 |
| 941 } | 941 } |
| OLD | NEW |