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

Side by Side Diff: src/api.cc

Issue 10831388: Handle native callbacks without getters. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed elements case, too. Rebased. Created 8 years, 4 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 | « no previous file | src/objects.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 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after
1060 1060
1061 static i::Handle<i::AccessorInfo> MakeAccessorInfo( 1061 static i::Handle<i::AccessorInfo> MakeAccessorInfo(
1062 v8::Handle<String> name, 1062 v8::Handle<String> name,
1063 AccessorGetter getter, 1063 AccessorGetter getter,
1064 AccessorSetter setter, 1064 AccessorSetter setter,
1065 v8::Handle<Value> data, 1065 v8::Handle<Value> data,
1066 v8::AccessControl settings, 1066 v8::AccessControl settings,
1067 v8::PropertyAttribute attributes, 1067 v8::PropertyAttribute attributes,
1068 v8::Handle<AccessorSignature> signature) { 1068 v8::Handle<AccessorSignature> signature) {
1069 i::Handle<i::AccessorInfo> obj = FACTORY->NewAccessorInfo(); 1069 i::Handle<i::AccessorInfo> obj = FACTORY->NewAccessorInfo();
1070 ASSERT(getter != NULL);
1071 SET_FIELD_WRAPPED(obj, set_getter, getter); 1070 SET_FIELD_WRAPPED(obj, set_getter, getter);
1072 SET_FIELD_WRAPPED(obj, set_setter, setter); 1071 SET_FIELD_WRAPPED(obj, set_setter, setter);
1073 if (data.IsEmpty()) data = v8::Undefined(); 1072 if (data.IsEmpty()) data = v8::Undefined();
1074 obj->set_data(*Utils::OpenHandle(*data)); 1073 obj->set_data(*Utils::OpenHandle(*data));
1075 obj->set_name(*Utils::OpenHandle(*name)); 1074 obj->set_name(*Utils::OpenHandle(*name));
1076 if (settings & ALL_CAN_READ) obj->set_all_can_read(true); 1075 if (settings & ALL_CAN_READ) obj->set_all_can_read(true);
1077 if (settings & ALL_CAN_WRITE) obj->set_all_can_write(true); 1076 if (settings & ALL_CAN_WRITE) obj->set_all_can_write(true);
1078 if (settings & PROHIBITS_OVERWRITING) obj->set_prohibits_overwriting(true); 1077 if (settings & PROHIBITS_OVERWRITING) obj->set_prohibits_overwriting(true);
1079 obj->set_property_attributes(static_cast<PropertyAttributes>(attributes)); 1078 obj->set_property_attributes(static_cast<PropertyAttributes>(attributes));
1080 if (!signature.IsEmpty()) { 1079 if (!signature.IsEmpty()) {
(...skipping 5445 matching lines...) Expand 10 before | Expand all | Expand 10 after
6526 6525
6527 v->VisitPointers(blocks_.first(), first_block_limit_); 6526 v->VisitPointers(blocks_.first(), first_block_limit_);
6528 6527
6529 for (int i = 1; i < blocks_.length(); i++) { 6528 for (int i = 1; i < blocks_.length(); i++) {
6530 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]); 6529 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]);
6531 } 6530 }
6532 } 6531 }
6533 6532
6534 6533
6535 } } // namespace v8::internal 6534 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698