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

Side by Side Diff: src/objects.h

Issue 240443005: Some MaybeHandles related cleanups. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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/isolate.h ('k') | 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 2346 matching lines...) Expand 10 before | Expand all | Expand 10 after
2357 Handle<Name> name, 2357 Handle<Name> name,
2358 bool continue_search); 2358 bool continue_search);
2359 static PropertyAttributes GetElementAttributeWithReceiver( 2359 static PropertyAttributes GetElementAttributeWithReceiver(
2360 Handle<JSObject> object, 2360 Handle<JSObject> object,
2361 Handle<JSReceiver> receiver, 2361 Handle<JSReceiver> receiver,
2362 uint32_t index, 2362 uint32_t index,
2363 bool continue_search); 2363 bool continue_search);
2364 2364
2365 // Retrieves an AccessorPair property from the given object. Might return 2365 // Retrieves an AccessorPair property from the given object. Might return
2366 // undefined if the property doesn't exist or is of a different kind. 2366 // undefined if the property doesn't exist or is of a different kind.
2367 static Handle<Object> GetAccessor(Handle<JSObject> object, 2367 MUST_USE_RESULT static MaybeHandle<Object> GetAccessor(
2368 Handle<Name> name, 2368 Handle<JSObject> object,
2369 AccessorComponent component); 2369 Handle<Name> name,
2370 AccessorComponent component);
2370 2371
2371 // Defines an AccessorPair property on the given object. 2372 // Defines an AccessorPair property on the given object.
2372 // TODO(mstarzinger): Rename to SetAccessor() and return empty handle on 2373 // TODO(mstarzinger): Rename to SetAccessor() and return empty handle on
2373 // exception instead of letting callers check for scheduled exception. 2374 // exception instead of letting callers check for scheduled exception.
2374 static void DefineAccessor(Handle<JSObject> object, 2375 static void DefineAccessor(Handle<JSObject> object,
2375 Handle<Name> name, 2376 Handle<Name> name,
2376 Handle<Object> getter, 2377 Handle<Object> getter,
2377 Handle<Object> setter, 2378 Handle<Object> setter,
2378 PropertyAttributes attributes, 2379 PropertyAttributes attributes,
2379 v8::AccessControl access_control = v8::DEFAULT); 2380 v8::AccessControl access_control = v8::DEFAULT);
2380 2381
2381 // Defines an AccessorInfo property on the given object. 2382 // Defines an AccessorInfo property on the given object.
2382 static Handle<Object> SetAccessor(Handle<JSObject> object, 2383 MUST_USE_RESULT static MaybeHandle<Object> SetAccessor(
2383 Handle<AccessorInfo> info); 2384 Handle<JSObject> object,
2385 Handle<AccessorInfo> info);
2384 2386
2385 MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithInterceptor( 2387 MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithInterceptor(
2386 Handle<JSObject> object, 2388 Handle<JSObject> object,
2387 Handle<Object> receiver, 2389 Handle<Object> receiver,
2388 Handle<Name> name, 2390 Handle<Name> name,
2389 PropertyAttributes* attributes); 2391 PropertyAttributes* attributes);
2390 MUST_USE_RESULT static MaybeHandle<Object> GetPropertyPostInterceptor( 2392 MUST_USE_RESULT static MaybeHandle<Object> GetPropertyPostInterceptor(
2391 Handle<JSObject> object, 2393 Handle<JSObject> object,
2392 Handle<Object> receiver, 2394 Handle<Object> receiver,
2393 Handle<Name> name, 2395 Handle<Name> name,
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
2651 // Note: this call does not update write barrier, the caller is responsible 2653 // Note: this call does not update write barrier, the caller is responsible
2652 // to ensure that |filler_value| can be collected without WB here. 2654 // to ensure that |filler_value| can be collected without WB here.
2653 inline void InitializeBody(Map* map, 2655 inline void InitializeBody(Map* map,
2654 Object* pre_allocated_value, 2656 Object* pre_allocated_value,
2655 Object* filler_value); 2657 Object* filler_value);
2656 2658
2657 // Check whether this object references another object 2659 // Check whether this object references another object
2658 bool ReferencesObject(Object* obj); 2660 bool ReferencesObject(Object* obj);
2659 2661
2660 // Disalow further properties to be added to the object. 2662 // Disalow further properties to be added to the object.
2661 static Handle<Object> PreventExtensions(Handle<JSObject> object); 2663 MUST_USE_RESULT static MaybeHandle<Object> PreventExtensions(
2664 Handle<JSObject> object);
2662 2665
2663 // ES5 Object.freeze 2666 // ES5 Object.freeze
2664 MUST_USE_RESULT static MaybeHandle<Object> Freeze(Handle<JSObject> object); 2667 MUST_USE_RESULT static MaybeHandle<Object> Freeze(Handle<JSObject> object);
2665 2668
2666 // Called the first time an object is observed with ES7 Object.observe. 2669 // Called the first time an object is observed with ES7 Object.observe.
2667 static void SetObserved(Handle<JSObject> object); 2670 static void SetObserved(Handle<JSObject> object);
2668 2671
2669 // Copy object. 2672 // Copy object.
2670 enum DeepCopyHints { 2673 enum DeepCopyHints {
2671 kNoHints = 0, 2674 kNoHints = 0,
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
2931 Handle<Object> value, 2934 Handle<Object> value,
2932 PropertyAttributes attributes); 2935 PropertyAttributes attributes);
2933 2936
2934 MUST_USE_RESULT static MaybeHandle<Object> DeleteProperty( 2937 MUST_USE_RESULT static MaybeHandle<Object> DeleteProperty(
2935 Handle<JSObject> object, 2938 Handle<JSObject> object,
2936 Handle<Name> name, 2939 Handle<Name> name,
2937 DeleteMode mode); 2940 DeleteMode mode);
2938 static Handle<Object> DeletePropertyPostInterceptor(Handle<JSObject> object, 2941 static Handle<Object> DeletePropertyPostInterceptor(Handle<JSObject> object,
2939 Handle<Name> name, 2942 Handle<Name> name,
2940 DeleteMode mode); 2943 DeleteMode mode);
2941 static Handle<Object> DeletePropertyWithInterceptor(Handle<JSObject> object, 2944 MUST_USE_RESULT static MaybeHandle<Object> DeletePropertyWithInterceptor(
2942 Handle<Name> name); 2945 Handle<JSObject> object,
2946 Handle<Name> name);
2943 2947
2944 // Deletes the named property in a normalized object. 2948 // Deletes the named property in a normalized object.
2945 static Handle<Object> DeleteNormalizedProperty(Handle<JSObject> object, 2949 static Handle<Object> DeleteNormalizedProperty(Handle<JSObject> object,
2946 Handle<Name> name, 2950 Handle<Name> name,
2947 DeleteMode mode); 2951 DeleteMode mode);
2948 2952
2949 MUST_USE_RESULT static MaybeHandle<Object> DeleteElement( 2953 MUST_USE_RESULT static MaybeHandle<Object> DeleteElement(
2950 Handle<JSObject> object, 2954 Handle<JSObject> object,
2951 uint32_t index, 2955 uint32_t index,
2952 DeleteMode mode); 2956 DeleteMode mode);
(...skipping 8147 matching lines...) Expand 10 before | Expand all | Expand 10 after
11100 } else { 11104 } else {
11101 value &= ~(1 << bit_position); 11105 value &= ~(1 << bit_position);
11102 } 11106 }
11103 return value; 11107 return value;
11104 } 11108 }
11105 }; 11109 };
11106 11110
11107 } } // namespace v8::internal 11111 } } // namespace v8::internal
11108 11112
11109 #endif // V8_OBJECTS_H_ 11113 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/isolate.h ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698