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

Side by Side Diff: src/liveedit.h

Issue 227573002: Return MaybeHandle from SetElement and DeleteElement. (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/json-parser.h ('k') | src/liveedit.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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 Handle<JSArray> GetJSArray() { 201 Handle<JSArray> GetJSArray() {
202 return array_; 202 return array_;
203 } 203 }
204 204
205 Isolate* isolate() const { 205 Isolate* isolate() const {
206 return array_->GetIsolate(); 206 return array_->GetIsolate();
207 } 207 }
208 208
209 protected: 209 protected:
210 void SetField(int field_position, Handle<Object> value) { 210 void SetField(int field_position, Handle<Object> value) {
211 Handle<Object> no_failure = 211 JSObject::SetElement(array_, field_position, value, NONE, SLOPPY).Assert();
212 JSObject::SetElement(array_, field_position, value, NONE, SLOPPY);
213 ASSERT(!no_failure.is_null());
214 USE(no_failure);
215 } 212 }
216 213
217 void SetSmiValueField(int field_position, int value) { 214 void SetSmiValueField(int field_position, int value) {
218 SetField(field_position, Handle<Smi>(Smi::FromInt(value), isolate())); 215 SetField(field_position, Handle<Smi>(Smi::FromInt(value), isolate()));
219 } 216 }
220 217
221 Handle<Object> GetField(int field_position) { 218 Handle<Object> GetField(int field_position) {
222 return Object::GetElementNoExceptionThrown( 219 return Object::GetElementNoExceptionThrown(
223 isolate(), array_, field_position); 220 isolate(), array_, field_position);
224 } 221 }
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 321
325 friend class JSArrayBasedStruct<SharedInfoWrapper>; 322 friend class JSArrayBasedStruct<SharedInfoWrapper>;
326 }; 323 };
327 324
328 #endif // ENABLE_DEBUGGER_SUPPORT 325 #endif // ENABLE_DEBUGGER_SUPPORT
329 326
330 327
331 } } // namespace v8::internal 328 } } // namespace v8::internal
332 329
333 #endif /* V*_LIVEEDIT_H_ */ 330 #endif /* V*_LIVEEDIT_H_ */
OLDNEW
« no previous file with comments | « src/json-parser.h ('k') | src/liveedit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698