OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/api.h" | 7 #include "src/api.h" |
8 #include "src/global-handles.h" | 8 #include "src/global-handles.h" |
9 | 9 |
10 #include "src/vm-state-inl.h" | 10 #include "src/vm-state-inl.h" |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 return false; | 228 return false; |
229 } | 229 } |
230 void* par = parameter(); | 230 void* par = parameter(); |
231 set_state(NEAR_DEATH); | 231 set_state(NEAR_DEATH); |
232 set_parameter(NULL); | 232 set_parameter(NULL); |
233 | 233 |
234 Object** object = location(); | 234 Object** object = location(); |
235 { | 235 { |
236 // Check that we are not passing a finalized external string to | 236 // Check that we are not passing a finalized external string to |
237 // the callback. | 237 // the callback. |
238 DCHECK(!object_->IsExternalAsciiString() || | 238 DCHECK(!object_->IsExternalOneByteString() || |
239 ExternalAsciiString::cast(object_)->resource() != NULL); | 239 ExternalOneByteString::cast(object_)->resource() != NULL); |
240 DCHECK(!object_->IsExternalTwoByteString() || | 240 DCHECK(!object_->IsExternalTwoByteString() || |
241 ExternalTwoByteString::cast(object_)->resource() != NULL); | 241 ExternalTwoByteString::cast(object_)->resource() != NULL); |
242 // Leaving V8. | 242 // Leaving V8. |
243 VMState<EXTERNAL> state(isolate); | 243 VMState<EXTERNAL> state(isolate); |
244 HandleScope handle_scope(isolate); | 244 HandleScope handle_scope(isolate); |
245 Handle<Object> handle(*object, isolate); | 245 Handle<Object> handle(*object, isolate); |
246 v8::WeakCallbackData<v8::Value, void> data( | 246 v8::WeakCallbackData<v8::Value, void> data( |
247 reinterpret_cast<v8::Isolate*>(isolate), | 247 reinterpret_cast<v8::Isolate*>(isolate), |
248 v8::Utils::ToLocal(handle), | 248 v8::Utils::ToLocal(handle), |
249 par); | 249 par); |
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1047 DCHECK_EQ(isolate->heap()->the_hole_value(), blocks_[block][offset]); | 1047 DCHECK_EQ(isolate->heap()->the_hole_value(), blocks_[block][offset]); |
1048 blocks_[block][offset] = object; | 1048 blocks_[block][offset] = object; |
1049 if (isolate->heap()->InNewSpace(object)) { | 1049 if (isolate->heap()->InNewSpace(object)) { |
1050 new_space_indices_.Add(size_); | 1050 new_space_indices_.Add(size_); |
1051 } | 1051 } |
1052 *index = size_++; | 1052 *index = size_++; |
1053 } | 1053 } |
1054 | 1054 |
1055 | 1055 |
1056 } } // namespace v8::internal | 1056 } } // namespace v8::internal |
OLD | NEW |