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 "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/api.h" | 8 #include "src/api.h" |
9 #include "src/contexts.h" | 9 #include "src/contexts.h" |
10 #include "src/deoptimizer.h" | 10 #include "src/deoptimizer.h" |
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
699 // Accessors::ScriptIsEmbedderDebugScript | 699 // Accessors::ScriptIsEmbedderDebugScript |
700 // | 700 // |
701 | 701 |
702 | 702 |
703 void Accessors::ScriptIsEmbedderDebugScriptGetter( | 703 void Accessors::ScriptIsEmbedderDebugScriptGetter( |
704 v8::Local<v8::Name> name, const v8::PropertyCallbackInfo<v8::Value>& info) { | 704 v8::Local<v8::Name> name, const v8::PropertyCallbackInfo<v8::Value>& info) { |
705 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate()); | 705 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate()); |
706 DisallowHeapAllocation no_allocation; | 706 DisallowHeapAllocation no_allocation; |
707 HandleScope scope(isolate); | 707 HandleScope scope(isolate); |
708 Object* object = *Utils::OpenHandle(*info.This()); | 708 Object* object = *Utils::OpenHandle(*info.This()); |
709 bool is_embedder_debug_script = | 709 bool is_embedder_debug_script = Script::cast(JSValue::cast(object)->value()) |
710 Script::cast(JSValue::cast(object)->value())->is_embedder_debug_script(); | 710 ->origin_options() |
| 711 .IsEmbedderDebugScript(); |
711 Object* res = *isolate->factory()->ToBoolean(is_embedder_debug_script); | 712 Object* res = *isolate->factory()->ToBoolean(is_embedder_debug_script); |
712 info.GetReturnValue().Set(Utils::ToLocal(Handle<Object>(res, isolate))); | 713 info.GetReturnValue().Set(Utils::ToLocal(Handle<Object>(res, isolate))); |
713 } | 714 } |
714 | 715 |
715 | 716 |
716 void Accessors::ScriptIsEmbedderDebugScriptSetter( | 717 void Accessors::ScriptIsEmbedderDebugScriptSetter( |
717 v8::Local<v8::Name> name, v8::Local<v8::Value> value, | 718 v8::Local<v8::Name> name, v8::Local<v8::Value> value, |
718 const v8::PropertyCallbackInfo<void>& info) { | 719 const v8::PropertyCallbackInfo<void>& info) { |
719 UNREACHABLE(); | 720 UNREACHABLE(); |
720 } | 721 } |
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1487 info->set_data(Smi::FromInt(index)); | 1488 info->set_data(Smi::FromInt(index)); |
1488 Handle<Object> getter = v8::FromCData(isolate, &ModuleGetExport); | 1489 Handle<Object> getter = v8::FromCData(isolate, &ModuleGetExport); |
1489 Handle<Object> setter = v8::FromCData(isolate, &ModuleSetExport); | 1490 Handle<Object> setter = v8::FromCData(isolate, &ModuleSetExport); |
1490 info->set_getter(*getter); | 1491 info->set_getter(*getter); |
1491 if (!(attributes & ReadOnly)) info->set_setter(*setter); | 1492 if (!(attributes & ReadOnly)) info->set_setter(*setter); |
1492 return info; | 1493 return info; |
1493 } | 1494 } |
1494 | 1495 |
1495 | 1496 |
1496 } } // namespace v8::internal | 1497 } } // namespace v8::internal |
OLD | NEW |