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

Side by Side Diff: src/factory.cc

Issue 1542943002: [proxies] Expose proxies in the API (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@2015-12-17_JSProxy_d8_printing_1530293004
Patch Set: adressing comments Created 5 years 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 | « src/builtins.cc ('k') | src/objects.h » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/factory.h" 5 #include "src/factory.h"
6 6
7 #include "src/allocation-site-scopes.h" 7 #include "src/allocation-site-scopes.h"
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/conversions.h" 10 #include "src/conversions.h"
(...skipping 1924 matching lines...) Expand 10 before | Expand all | Expand 10 after
1935 1935
1936 Handle<JSDataView> Factory::NewJSDataView(Handle<JSArrayBuffer> buffer, 1936 Handle<JSDataView> Factory::NewJSDataView(Handle<JSArrayBuffer> buffer,
1937 size_t byte_offset, 1937 size_t byte_offset,
1938 size_t byte_length) { 1938 size_t byte_length) {
1939 Handle<JSDataView> obj = NewJSDataView(); 1939 Handle<JSDataView> obj = NewJSDataView();
1940 SetupArrayBufferView(isolate(), obj, buffer, byte_offset, byte_length); 1940 SetupArrayBufferView(isolate(), obj, buffer, byte_offset, byte_length);
1941 return obj; 1941 return obj;
1942 } 1942 }
1943 1943
1944 1944
1945 // ES6 section 9.5.15 ProxyCreate (target, handler)
1945 Handle<JSProxy> Factory::NewJSProxy(Handle<JSReceiver> target, 1946 Handle<JSProxy> Factory::NewJSProxy(Handle<JSReceiver> target,
1946 Handle<JSReceiver> handler) { 1947 Handle<JSReceiver> handler) {
1947 // Allocate the proxy object. 1948 // Allocate the proxy object.
1948 Handle<Map> map; 1949 Handle<Map> map;
1949 if (target->IsCallable()) { 1950 if (target->IsCallable()) {
1950 if (target->IsConstructor()) { 1951 if (target->IsConstructor()) {
1951 map = Handle<Map>(isolate()->proxy_constructor_map()); 1952 map = Handle<Map>(isolate()->proxy_constructor_map());
1952 } else { 1953 } else {
1953 map = Handle<Map>(isolate()->proxy_callable_map()); 1954 map = Handle<Map>(isolate()->proxy_callable_map());
1954 } 1955 }
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
2322 } 2323 }
2323 2324
2324 2325
2325 Handle<Object> Factory::ToBoolean(bool value) { 2326 Handle<Object> Factory::ToBoolean(bool value) {
2326 return value ? true_value() : false_value(); 2327 return value ? true_value() : false_value();
2327 } 2328 }
2328 2329
2329 2330
2330 } // namespace internal 2331 } // namespace internal
2331 } // namespace v8 2332 } // namespace v8
OLDNEW
« no previous file with comments | « src/builtins.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698