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

Side by Side Diff: src/handles.cc

Issue 88026: Added ForceSet on objects (Closed)
Patch Set: Added docs for ForceSet Created 11 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
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 205
206 Handle<Object> SetProperty(Handle<Object> object, 206 Handle<Object> SetProperty(Handle<Object> object,
207 Handle<Object> key, 207 Handle<Object> key,
208 Handle<Object> value, 208 Handle<Object> value,
209 PropertyAttributes attributes) { 209 PropertyAttributes attributes) {
210 CALL_HEAP_FUNCTION( 210 CALL_HEAP_FUNCTION(
211 Runtime::SetObjectProperty(object, key, value, attributes), Object); 211 Runtime::SetObjectProperty(object, key, value, attributes), Object);
212 } 212 }
213 213
214 214
215 Handle<Object> ForceSetProperty(Handle<JSObject> object,
216 Handle<Object> key,
217 Handle<Object> value,
218 PropertyAttributes attributes) {
219 CALL_HEAP_FUNCTION(
220 Runtime::ForceSetObjectProperty(object, key, value, attributes), Object);
221 }
222
223
215 Handle<Object> IgnoreAttributesAndSetLocalProperty( 224 Handle<Object> IgnoreAttributesAndSetLocalProperty(
216 Handle<JSObject> object, 225 Handle<JSObject> object,
217 Handle<String> key, 226 Handle<String> key,
218 Handle<Object> value, 227 Handle<Object> value,
219 PropertyAttributes attributes) { 228 PropertyAttributes attributes) {
220 CALL_HEAP_FUNCTION(object-> 229 CALL_HEAP_FUNCTION(object->
221 IgnoreAttributesAndSetLocalProperty(*key, *value, attributes), Object); 230 IgnoreAttributesAndSetLocalProperty(*key, *value, attributes), Object);
222 } 231 }
223 232
224 Handle<Object> SetPropertyWithInterceptor(Handle<JSObject> object, 233 Handle<Object> SetPropertyWithInterceptor(Handle<JSObject> object,
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 Handle<Context> compile_context, 691 Handle<Context> compile_context,
683 Handle<Context> function_context) { 692 Handle<Context> function_context) {
684 Handle<FixedArray> arr = Factory::NewFixedArray(3); 693 Handle<FixedArray> arr = Factory::NewFixedArray(3);
685 arr->set(0, Smi::FromInt(index)); 694 arr->set(0, Smi::FromInt(index));
686 arr->set(1, *compile_context); // Compile in this context 695 arr->set(1, *compile_context); // Compile in this context
687 arr->set(2, *function_context); // Set function context to this 696 arr->set(2, *function_context); // Set function context to this
688 fun->shared()->set_lazy_load_data(*arr); 697 fun->shared()->set_lazy_load_data(*arr);
689 } 698 }
690 699
691 } } // namespace v8::internal 700 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698