OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
99 has_fatal_error_ = true; | 99 has_fatal_error_ = true; |
100 } | 100 } |
101 | 101 |
102 | 102 |
103 void V8::TearDown() { | 103 void V8::TearDown() { |
104 Isolate* isolate = Isolate::Current(); | 104 Isolate* isolate = Isolate::Current(); |
105 ASSERT(isolate->IsDefaultIsolate()); | 105 ASSERT(isolate->IsDefaultIsolate()); |
106 | 106 |
107 if (!has_been_set_up_ || has_been_disposed_) return; | 107 if (!has_been_set_up_ || has_been_disposed_) return; |
108 | 108 |
109 isolate->TearDown(); | |
110 delete isolate; | |
Yang
2012/07/19 12:47:30
Why move this code?
sanjoy
2012/07/19 15:06:09
Added comment.
| |
111 | |
109 ElementsAccessor::TearDown(); | 112 ElementsAccessor::TearDown(); |
110 LOperand::TearDownCaches(); | 113 LOperand::TearDownCaches(); |
111 RegisteredExtension::UnregisterAll(); | 114 RegisteredExtension::UnregisterAll(); |
112 | 115 |
113 isolate->TearDown(); | |
114 delete isolate; | |
115 | |
116 is_running_ = false; | 116 is_running_ = false; |
117 has_been_disposed_ = true; | 117 has_been_disposed_ = true; |
118 | 118 |
119 delete call_completed_callbacks_; | 119 delete call_completed_callbacks_; |
120 call_completed_callbacks_ = NULL; | 120 call_completed_callbacks_ = NULL; |
121 | 121 |
122 OS::TearDown(); | 122 OS::TearDown(); |
123 } | 123 } |
124 | 124 |
125 | 125 |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
279 SetUpJSCallerSavedCodeData(); | 279 SetUpJSCallerSavedCodeData(); |
280 SamplerRegistry::SetUp(); | 280 SamplerRegistry::SetUp(); |
281 ExternalReference::SetUp(); | 281 ExternalReference::SetUp(); |
282 } | 282 } |
283 | 283 |
284 void V8::InitializeOncePerProcess() { | 284 void V8::InitializeOncePerProcess() { |
285 CallOnce(&init_once, &InitializeOncePerProcessImpl); | 285 CallOnce(&init_once, &InitializeOncePerProcessImpl); |
286 } | 286 } |
287 | 287 |
288 } } // namespace v8::internal | 288 } } // namespace v8::internal |
OLD | NEW |