Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Side by Side Diff: src/accessors.cc

Issue 1135343005: Revert of [V8] Added Script::is_opaque flag for embedders (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/v8.h ('k') | src/api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 = Script::cast(JSValue::cast(object)->value()) 709 bool is_embedder_debug_script =
710 ->origin_options() 710 Script::cast(JSValue::cast(object)->value())->is_embedder_debug_script();
711 .IsEmbedderDebugScript();
712 Object* res = *isolate->factory()->ToBoolean(is_embedder_debug_script); 711 Object* res = *isolate->factory()->ToBoolean(is_embedder_debug_script);
713 info.GetReturnValue().Set(Utils::ToLocal(Handle<Object>(res, isolate))); 712 info.GetReturnValue().Set(Utils::ToLocal(Handle<Object>(res, isolate)));
714 } 713 }
715 714
716 715
717 void Accessors::ScriptIsEmbedderDebugScriptSetter( 716 void Accessors::ScriptIsEmbedderDebugScriptSetter(
718 v8::Local<v8::Name> name, v8::Local<v8::Value> value, 717 v8::Local<v8::Name> name, v8::Local<v8::Value> value,
719 const v8::PropertyCallbackInfo<void>& info) { 718 const v8::PropertyCallbackInfo<void>& info) {
720 UNREACHABLE(); 719 UNREACHABLE();
721 } 720 }
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after
1488 info->set_data(Smi::FromInt(index)); 1487 info->set_data(Smi::FromInt(index));
1489 Handle<Object> getter = v8::FromCData(isolate, &ModuleGetExport); 1488 Handle<Object> getter = v8::FromCData(isolate, &ModuleGetExport);
1490 Handle<Object> setter = v8::FromCData(isolate, &ModuleSetExport); 1489 Handle<Object> setter = v8::FromCData(isolate, &ModuleSetExport);
1491 info->set_getter(*getter); 1490 info->set_getter(*getter);
1492 if (!(attributes & ReadOnly)) info->set_setter(*setter); 1491 if (!(attributes & ReadOnly)) info->set_setter(*setter);
1493 return info; 1492 return info;
1494 } 1493 }
1495 1494
1496 1495
1497 } } // namespace v8::internal 1496 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698