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

Side by Side Diff: src/api-natives.cc

Issue 2715593002: Don't mark remote contexts as callable. (Closed)
Patch Set: hmm Created 3 years, 10 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 | « no previous file | src/bootstrapper.cc » ('j') | src/bootstrapper.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/api-natives.h" 5 #include "src/api-natives.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/isolate-inl.h" 8 #include "src/isolate-inl.h"
9 #include "src/lookup.h" 9 #include "src/lookup.h"
10 #include "src/messages.h" 10 #include "src/messages.h"
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 Handle<JSFunction> object_function = 531 Handle<JSFunction> object_function =
532 isolate->factory()->NewFunctionFromSharedFunctionInfo( 532 isolate->factory()->NewFunctionFromSharedFunctionInfo(
533 initial_map, shared, isolate->factory()->undefined_value()); 533 initial_map, shared, isolate->factory()->undefined_value());
534 Handle<Map> object_map = isolate->factory()->NewMap( 534 Handle<Map> object_map = isolate->factory()->NewMap(
535 JS_SPECIAL_API_OBJECT_TYPE, 535 JS_SPECIAL_API_OBJECT_TYPE,
536 JSObject::kHeaderSize + data->internal_field_count() * kPointerSize, 536 JSObject::kHeaderSize + data->internal_field_count() * kPointerSize,
537 FAST_HOLEY_SMI_ELEMENTS); 537 FAST_HOLEY_SMI_ELEMENTS);
538 JSFunction::SetInitialMap(object_function, object_map, 538 JSFunction::SetInitialMap(object_function, object_map,
539 isolate->factory()->null_value()); 539 isolate->factory()->null_value());
540 object_map->set_is_access_check_needed(true); 540 object_map->set_is_access_check_needed(true);
541 object_map->set_is_callable();
542 object_map->set_is_constructor(true);
543 541
544 Handle<JSObject> object = isolate->factory()->NewJSObject(object_function); 542 Handle<JSObject> object = isolate->factory()->NewJSObject(object_function);
545 JSObject::ForceSetPrototype(object, isolate->factory()->null_value()); 543 JSObject::ForceSetPrototype(object, isolate->factory()->null_value());
546 544
547 return object; 545 return object;
548 } 546 }
549 547
550 void ApiNatives::AddDataProperty(Isolate* isolate, Handle<TemplateInfo> info, 548 void ApiNatives::AddDataProperty(Isolate* isolate, Handle<TemplateInfo> info,
551 Handle<Name> name, Handle<Object> value, 549 Handle<Name> name, Handle<Object> value,
552 PropertyAttributes attributes) { 550 PropertyAttributes attributes) {
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 map->set_is_constructor(true); 701 map->set_is_constructor(true);
704 } 702 }
705 703
706 if (immutable_proto) map->set_immutable_proto(true); 704 if (immutable_proto) map->set_immutable_proto(true);
707 705
708 return result; 706 return result;
709 } 707 }
710 708
711 } // namespace internal 709 } // namespace internal
712 } // namespace v8 710 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/bootstrapper.cc » ('j') | src/bootstrapper.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698