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

Side by Side Diff: src/runtime.cc

Issue 306543002: Harden Runtime_FunctionSetPrototype, Isolate::PrintStack (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/hydrogen.cc ('k') | no next file » | 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 <stdlib.h> 5 #include <stdlib.h>
6 #include <limits> 6 #include <limits>
7 7
8 #include "v8.h" 8 #include "v8.h"
9 9
10 #include "accessors.h" 10 #include "accessors.h"
(...skipping 3010 matching lines...) Expand 10 before | Expand all | Expand 10 after
3021 return isolate->heap()->undefined_value(); 3021 return isolate->heap()->undefined_value();
3022 } 3022 }
3023 3023
3024 3024
3025 RUNTIME_FUNCTION(Runtime_FunctionSetPrototype) { 3025 RUNTIME_FUNCTION(Runtime_FunctionSetPrototype) {
3026 HandleScope scope(isolate); 3026 HandleScope scope(isolate);
3027 ASSERT(args.length() == 2); 3027 ASSERT(args.length() == 2);
3028 3028
3029 CONVERT_ARG_HANDLE_CHECKED(JSFunction, fun, 0); 3029 CONVERT_ARG_HANDLE_CHECKED(JSFunction, fun, 0);
3030 CONVERT_ARG_HANDLE_CHECKED(Object, value, 1); 3030 CONVERT_ARG_HANDLE_CHECKED(Object, value, 1);
3031 ASSERT(fun->should_have_prototype()); 3031 RUNTIME_ASSERT(fun->should_have_prototype());
3032 Accessors::FunctionSetPrototype(fun, value); 3032 Accessors::FunctionSetPrototype(fun, value);
3033 return args[0]; // return TOS 3033 return args[0]; // return TOS
3034 } 3034 }
3035 3035
3036 3036
3037 RUNTIME_FUNCTION(Runtime_FunctionIsAPIFunction) { 3037 RUNTIME_FUNCTION(Runtime_FunctionIsAPIFunction) {
3038 SealHandleScope shs(isolate); 3038 SealHandleScope shs(isolate);
3039 ASSERT(args.length() == 1); 3039 ASSERT(args.length() == 1);
3040 3040
3041 CONVERT_ARG_CHECKED(JSFunction, f, 0); 3041 CONVERT_ARG_CHECKED(JSFunction, f, 0);
(...skipping 12129 matching lines...) Expand 10 before | Expand all | Expand 10 after
15171 } 15171 }
15172 return NULL; 15172 return NULL;
15173 } 15173 }
15174 15174
15175 15175
15176 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { 15176 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) {
15177 return &(kIntrinsicFunctions[static_cast<int>(id)]); 15177 return &(kIntrinsicFunctions[static_cast<int>(id)]);
15178 } 15178 }
15179 15179
15180 } } // namespace v8::internal 15180 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698