| 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 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 670 // Accessors::ScriptIsEmbedderDebugScript | 670 // Accessors::ScriptIsEmbedderDebugScript |
| 671 // | 671 // |
| 672 | 672 |
| 673 | 673 |
| 674 void Accessors::ScriptIsEmbedderDebugScriptGetter( | 674 void Accessors::ScriptIsEmbedderDebugScriptGetter( |
| 675 v8::Local<v8::Name> name, const v8::PropertyCallbackInfo<v8::Value>& info) { | 675 v8::Local<v8::Name> name, const v8::PropertyCallbackInfo<v8::Value>& info) { |
| 676 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate()); | 676 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate()); |
| 677 DisallowHeapAllocation no_allocation; | 677 DisallowHeapAllocation no_allocation; |
| 678 HandleScope scope(isolate); | 678 HandleScope scope(isolate); |
| 679 Object* object = *Utils::OpenHandle(*info.This()); | 679 Object* object = *Utils::OpenHandle(*info.This()); |
| 680 bool is_embedder_debug_script = | 680 bool is_embedder_debug_script = Script::cast(JSValue::cast(object)->value()) |
| 681 Script::cast(JSValue::cast(object)->value())->is_embedder_debug_script(); | 681 ->origin_options() |
| 682 .IsEmbedderDebugScript(); |
| 682 Object* res = *isolate->factory()->ToBoolean(is_embedder_debug_script); | 683 Object* res = *isolate->factory()->ToBoolean(is_embedder_debug_script); |
| 683 info.GetReturnValue().Set(Utils::ToLocal(Handle<Object>(res, isolate))); | 684 info.GetReturnValue().Set(Utils::ToLocal(Handle<Object>(res, isolate))); |
| 684 } | 685 } |
| 685 | 686 |
| 686 | 687 |
| 687 void Accessors::ScriptIsEmbedderDebugScriptSetter( | 688 void Accessors::ScriptIsEmbedderDebugScriptSetter( |
| 688 v8::Local<v8::Name> name, v8::Local<v8::Value> value, | 689 v8::Local<v8::Name> name, v8::Local<v8::Value> value, |
| 689 const v8::PropertyCallbackInfo<void>& info) { | 690 const v8::PropertyCallbackInfo<void>& info) { |
| 690 UNREACHABLE(); | 691 UNREACHABLE(); |
| 691 } | 692 } |
| (...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1451 info->set_data(Smi::FromInt(index)); | 1452 info->set_data(Smi::FromInt(index)); |
| 1452 Handle<Object> getter = v8::FromCData(isolate, &ModuleGetExport); | 1453 Handle<Object> getter = v8::FromCData(isolate, &ModuleGetExport); |
| 1453 Handle<Object> setter = v8::FromCData(isolate, &ModuleSetExport); | 1454 Handle<Object> setter = v8::FromCData(isolate, &ModuleSetExport); |
| 1454 info->set_getter(*getter); | 1455 info->set_getter(*getter); |
| 1455 if (!(attributes & ReadOnly)) info->set_setter(*setter); | 1456 if (!(attributes & ReadOnly)) info->set_setter(*setter); |
| 1456 return info; | 1457 return info; |
| 1457 } | 1458 } |
| 1458 | 1459 |
| 1459 | 1460 |
| 1460 } } // namespace v8::internal | 1461 } } // namespace v8::internal |
| OLD | NEW |