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

Side by Side Diff: src/runtime.cc

Issue 240113010: Tighten OpenHandle's extra checks. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebase Created 6 years, 8 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/objects-inl.h ('k') | test/cctest/test-api.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 // 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 6016 matching lines...) Expand 10 before | Expand all | Expand 10 after
6027 6027
6028 6028
6029 // Return property names from named interceptor. 6029 // Return property names from named interceptor.
6030 // args[0]: object 6030 // args[0]: object
6031 RUNTIME_FUNCTION(Runtime_GetNamedInterceptorPropertyNames) { 6031 RUNTIME_FUNCTION(Runtime_GetNamedInterceptorPropertyNames) {
6032 HandleScope scope(isolate); 6032 HandleScope scope(isolate);
6033 ASSERT(args.length() == 1); 6033 ASSERT(args.length() == 1);
6034 CONVERT_ARG_HANDLE_CHECKED(JSObject, obj, 0); 6034 CONVERT_ARG_HANDLE_CHECKED(JSObject, obj, 0);
6035 6035
6036 if (obj->HasNamedInterceptor()) { 6036 if (obj->HasNamedInterceptor()) {
6037 Handle<JSArray> result; 6037 Handle<JSObject> result;
6038 if (JSObject::GetKeysForNamedInterceptor(obj, obj).ToHandle(&result)) { 6038 if (JSObject::GetKeysForNamedInterceptor(obj, obj).ToHandle(&result)) {
6039 return *result; 6039 return *result;
6040 } 6040 }
6041 } 6041 }
6042 return isolate->heap()->undefined_value(); 6042 return isolate->heap()->undefined_value();
6043 } 6043 }
6044 6044
6045 6045
6046 // Return element names from indexed interceptor. 6046 // Return element names from indexed interceptor.
6047 // args[0]: object 6047 // args[0]: object
6048 RUNTIME_FUNCTION(Runtime_GetIndexedInterceptorElementNames) { 6048 RUNTIME_FUNCTION(Runtime_GetIndexedInterceptorElementNames) {
6049 HandleScope scope(isolate); 6049 HandleScope scope(isolate);
6050 ASSERT(args.length() == 1); 6050 ASSERT(args.length() == 1);
6051 CONVERT_ARG_HANDLE_CHECKED(JSObject, obj, 0); 6051 CONVERT_ARG_HANDLE_CHECKED(JSObject, obj, 0);
6052 6052
6053 if (obj->HasIndexedInterceptor()) { 6053 if (obj->HasIndexedInterceptor()) {
6054 Handle<JSArray> result; 6054 Handle<JSObject> result;
6055 if (JSObject::GetKeysForIndexedInterceptor(obj, obj).ToHandle(&result)) { 6055 if (JSObject::GetKeysForIndexedInterceptor(obj, obj).ToHandle(&result)) {
6056 return *result; 6056 return *result;
6057 } 6057 }
6058 } 6058 }
6059 return isolate->heap()->undefined_value(); 6059 return isolate->heap()->undefined_value();
6060 } 6060 }
6061 6061
6062 6062
6063 RUNTIME_FUNCTION(Runtime_LocalKeys) { 6063 RUNTIME_FUNCTION(Runtime_LocalKeys) {
6064 HandleScope scope(isolate); 6064 HandleScope scope(isolate);
(...skipping 9091 matching lines...) Expand 10 before | Expand all | Expand 10 after
15156 } 15156 }
15157 return NULL; 15157 return NULL;
15158 } 15158 }
15159 15159
15160 15160
15161 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { 15161 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) {
15162 return &(kIntrinsicFunctions[static_cast<int>(id)]); 15162 return &(kIntrinsicFunctions[static_cast<int>(id)]);
15163 } 15163 }
15164 15164
15165 } } // namespace v8::internal 15165 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698