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

Side by Side Diff: src/accessors.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 | « include/v8.h ('k') | src/api.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 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 849 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 info.GetReturnValue().Set(Utils::ToLocal(result)); 860 info.GetReturnValue().Set(Utils::ToLocal(result));
861 } 861 }
862 862
863 863
864 void Accessors::FunctionPrototypeSetter( 864 void Accessors::FunctionPrototypeSetter(
865 v8::Local<v8::String> name, 865 v8::Local<v8::String> name,
866 v8::Local<v8::Value> val, 866 v8::Local<v8::Value> val,
867 const v8::PropertyCallbackInfo<void>& info) { 867 const v8::PropertyCallbackInfo<void>& info) {
868 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate()); 868 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate());
869 HandleScope scope(isolate); 869 HandleScope scope(isolate);
870 Handle<JSObject> object = Utils::OpenHandle(*info.This()); 870 Handle<JSObject> object =
871 Handle<JSObject>::cast(Utils::OpenHandle(*info.This()));
871 Handle<Object> value = Utils::OpenHandle(*val); 872 Handle<Object> value = Utils::OpenHandle(*val);
872 873
873 SetFunctionPrototype(isolate, object, value); 874 SetFunctionPrototype(isolate, object, value);
874 } 875 }
875 876
876 877
877 Handle<AccessorInfo> Accessors::FunctionPrototypeInfo( 878 Handle<AccessorInfo> Accessors::FunctionPrototypeInfo(
878 Isolate* isolate, PropertyAttributes attributes) { 879 Isolate* isolate, PropertyAttributes attributes) {
879 return MakeAccessor(isolate, 880 return MakeAccessor(isolate,
880 isolate->factory()->prototype_string(), 881 isolate->factory()->prototype_string(),
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
1261 info->set_data(Smi::FromInt(index)); 1262 info->set_data(Smi::FromInt(index));
1262 Handle<Object> getter = v8::FromCData(isolate, &ModuleGetExport); 1263 Handle<Object> getter = v8::FromCData(isolate, &ModuleGetExport);
1263 Handle<Object> setter = v8::FromCData(isolate, &ModuleSetExport); 1264 Handle<Object> setter = v8::FromCData(isolate, &ModuleSetExport);
1264 info->set_getter(*getter); 1265 info->set_getter(*getter);
1265 if (!(attributes & ReadOnly)) info->set_setter(*setter); 1266 if (!(attributes & ReadOnly)) info->set_setter(*setter);
1266 return info; 1267 return info;
1267 } 1268 }
1268 1269
1269 1270
1270 } } // namespace v8::internal 1271 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698