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

Side by Side Diff: src/accessors.cc

Issue 1358423002: [es6] Introduce spec compliant IsConstructor. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix stupid fuzzer failure (constructor bit set on sloppy/strict arguments). Fix MIPS/MIPS64 typos, … Created 5 years, 3 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/api-natives.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/accessors.h" 5 #include "src/accessors.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/contexts.h" 8 #include "src/contexts.h"
9 #include "src/deoptimizer.h" 9 #include "src/deoptimizer.h"
10 #include "src/execution.h" 10 #include "src/execution.h"
(...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 function, "update", isolate->factory()->prototype_string(), old_value); 922 function, "update", isolate->factory()->prototype_string(), old_value);
923 if (result.is_null()) return MaybeHandle<Object>(); 923 if (result.is_null()) return MaybeHandle<Object>();
924 } 924 }
925 925
926 return function; 926 return function;
927 } 927 }
928 928
929 929
930 MaybeHandle<Object> Accessors::FunctionSetPrototype(Handle<JSFunction> function, 930 MaybeHandle<Object> Accessors::FunctionSetPrototype(Handle<JSFunction> function,
931 Handle<Object> prototype) { 931 Handle<Object> prototype) {
932 DCHECK(function->should_have_prototype()); 932 DCHECK(function->IsConstructor());
933 Isolate* isolate = function->GetIsolate(); 933 Isolate* isolate = function->GetIsolate();
934 return SetFunctionPrototype(isolate, function, prototype); 934 return SetFunctionPrototype(isolate, function, prototype);
935 } 935 }
936 936
937 937
938 void Accessors::FunctionPrototypeGetter( 938 void Accessors::FunctionPrototypeGetter(
939 v8::Local<v8::Name> name, 939 v8::Local<v8::Name> name,
940 const v8::PropertyCallbackInfo<v8::Value>& info) { 940 const v8::PropertyCallbackInfo<v8::Value>& info) {
941 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate()); 941 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate());
942 HandleScope scope(isolate); 942 HandleScope scope(isolate);
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
1502 Handle<Object> getter = v8::FromCData(isolate, &ModuleGetExport); 1502 Handle<Object> getter = v8::FromCData(isolate, &ModuleGetExport);
1503 Handle<Object> setter = v8::FromCData(isolate, &ModuleSetExport); 1503 Handle<Object> setter = v8::FromCData(isolate, &ModuleSetExport);
1504 info->set_getter(*getter); 1504 info->set_getter(*getter);
1505 if (!(attributes & ReadOnly)) info->set_setter(*setter); 1505 if (!(attributes & ReadOnly)) info->set_setter(*setter);
1506 return info; 1506 return info;
1507 } 1507 }
1508 1508
1509 1509
1510 } // namespace internal 1510 } // namespace internal
1511 } // namespace v8 1511 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/api-natives.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698