| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 "api.h" | 5 #include "api.h" |
| 6 | 6 |
| 7 #include <string.h> // For memcpy, strlen. | 7 #include <string.h> // For memcpy, strlen. |
| 8 #include <cmath> // For isnan. | 8 #include <cmath> // For isnan. |
| 9 #include "../include/v8-debug.h" | 9 #include "../include/v8-debug.h" |
| 10 #include "../include/v8-profiler.h" | 10 #include "../include/v8-profiler.h" |
| (...skipping 3613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3624 | 3624 |
| 3625 v8::Local<v8::Value> v8::Object::GetHiddenValue(v8::Handle<v8::String> key) { | 3625 v8::Local<v8::Value> v8::Object::GetHiddenValue(v8::Handle<v8::String> key) { |
| 3626 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); | 3626 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); |
| 3627 ON_BAILOUT(isolate, "v8::Object::GetHiddenValue()", | 3627 ON_BAILOUT(isolate, "v8::Object::GetHiddenValue()", |
| 3628 return Local<v8::Value>()); | 3628 return Local<v8::Value>()); |
| 3629 ENTER_V8(isolate); | 3629 ENTER_V8(isolate); |
| 3630 i::Handle<i::JSObject> self = Utils::OpenHandle(this); | 3630 i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
| 3631 i::Handle<i::String> key_obj = Utils::OpenHandle(*key); | 3631 i::Handle<i::String> key_obj = Utils::OpenHandle(*key); |
| 3632 i::Handle<i::String> key_string = | 3632 i::Handle<i::String> key_string = |
| 3633 isolate->factory()->InternalizeString(key_obj); | 3633 isolate->factory()->InternalizeString(key_obj); |
| 3634 i::Handle<i::Object> result(self->GetHiddenProperty(*key_string), isolate); | 3634 i::Handle<i::Object> result(self->GetHiddenProperty(key_string), isolate); |
| 3635 if (result->IsTheHole()) return v8::Local<v8::Value>(); | 3635 if (result->IsTheHole()) return v8::Local<v8::Value>(); |
| 3636 return Utils::ToLocal(result); | 3636 return Utils::ToLocal(result); |
| 3637 } | 3637 } |
| 3638 | 3638 |
| 3639 | 3639 |
| 3640 bool v8::Object::DeleteHiddenValue(v8::Handle<v8::String> key) { | 3640 bool v8::Object::DeleteHiddenValue(v8::Handle<v8::String> key) { |
| 3641 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); | 3641 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); |
| 3642 ON_BAILOUT(isolate, "v8::DeleteHiddenValue()", return false); | 3642 ON_BAILOUT(isolate, "v8::DeleteHiddenValue()", return false); |
| 3643 ENTER_V8(isolate); | 3643 ENTER_V8(isolate); |
| 3644 i::HandleScope scope(isolate); | 3644 i::HandleScope scope(isolate); |
| (...skipping 3937 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7582 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7582 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
| 7583 Address callback_address = | 7583 Address callback_address = |
| 7584 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7584 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 7585 VMState<EXTERNAL> state(isolate); | 7585 VMState<EXTERNAL> state(isolate); |
| 7586 ExternalCallbackScope call_scope(isolate, callback_address); | 7586 ExternalCallbackScope call_scope(isolate, callback_address); |
| 7587 callback(info); | 7587 callback(info); |
| 7588 } | 7588 } |
| 7589 | 7589 |
| 7590 | 7590 |
| 7591 } } // namespace v8::internal | 7591 } } // namespace v8::internal |
| OLD | NEW |