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

Side by Side Diff: src/runtime.cc

Issue 8520001: Fix instanceof a function proxy. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | test/mjsunit/harmony/proxies.js » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 8163 matching lines...) Expand 10 before | Expand all | Expand 10 after
8174 PropertyAttributes attr = 8174 PropertyAttributes attr =
8175 static_cast<PropertyAttributes>(DONT_DELETE | DONT_ENUM | READ_ONLY); 8175 static_cast<PropertyAttributes>(DONT_DELETE | DONT_ENUM | READ_ONLY);
8176 ForceSetProperty(bound_function, length_symbol, new_length, attr); 8176 ForceSetProperty(bound_function, length_symbol, new_length, attr);
8177 return *bound_function; 8177 return *bound_function;
8178 } 8178 }
8179 8179
8180 8180
8181 RUNTIME_FUNCTION(MaybeObject*, Runtime_BoundFunctionGetBindings) { 8181 RUNTIME_FUNCTION(MaybeObject*, Runtime_BoundFunctionGetBindings) {
8182 HandleScope handles(isolate); 8182 HandleScope handles(isolate);
8183 ASSERT(args.length() == 1); 8183 ASSERT(args.length() == 1);
8184 CONVERT_ARG_CHECKED(JSObject, callable, 0); 8184 CONVERT_ARG_CHECKED(JSReceiver, callable, 0);
8185 if (callable->IsJSFunction()) { 8185 if (callable->IsJSFunction()) {
8186 Handle<JSFunction> function = Handle<JSFunction>::cast(callable); 8186 Handle<JSFunction> function = Handle<JSFunction>::cast(callable);
8187 if (function->shared()->bound()) { 8187 if (function->shared()->bound()) {
8188 Handle<FixedArray> bindings(function->function_bindings()); 8188 Handle<FixedArray> bindings(function->function_bindings());
8189 ASSERT(bindings->map() == isolate->heap()->fixed_cow_array_map()); 8189 ASSERT(bindings->map() == isolate->heap()->fixed_cow_array_map());
8190 return *isolate->factory()->NewJSArrayWithElements(bindings); 8190 return *isolate->factory()->NewJSArrayWithElements(bindings);
8191 } 8191 }
8192 } 8192 }
8193 return isolate->heap()->undefined_value(); 8193 return isolate->heap()->undefined_value();
8194 } 8194 }
(...skipping 5376 matching lines...) Expand 10 before | Expand all | Expand 10 after
13571 } else { 13571 } else {
13572 // Handle last resort GC and make sure to allow future allocations 13572 // Handle last resort GC and make sure to allow future allocations
13573 // to grow the heap without causing GCs (if possible). 13573 // to grow the heap without causing GCs (if possible).
13574 isolate->counters()->gc_last_resort_from_js()->Increment(); 13574 isolate->counters()->gc_last_resort_from_js()->Increment();
13575 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags); 13575 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags);
13576 } 13576 }
13577 } 13577 }
13578 13578
13579 13579
13580 } } // namespace v8::internal 13580 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/harmony/proxies.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698