OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_LIVEEDIT_H_ | 5 #ifndef V8_LIVEEDIT_H_ |
6 #define V8_LIVEEDIT_H_ | 6 #define V8_LIVEEDIT_H_ |
7 | 7 |
8 | 8 |
9 | 9 |
10 // Live Edit feature implementation. | 10 // Live Edit feature implementation. |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 Handle<JSArray> GetJSArray() { | 242 Handle<JSArray> GetJSArray() { |
243 return array_; | 243 return array_; |
244 } | 244 } |
245 | 245 |
246 Isolate* isolate() const { | 246 Isolate* isolate() const { |
247 return array_->GetIsolate(); | 247 return array_->GetIsolate(); |
248 } | 248 } |
249 | 249 |
250 protected: | 250 protected: |
251 void SetField(int field_position, Handle<Object> value) { | 251 void SetField(int field_position, Handle<Object> value) { |
252 JSObject::SetElement(array_, field_position, value, SLOPPY).Assert(); | 252 Object::SetElement(isolate(), array_, field_position, value, SLOPPY) |
| 253 .Assert(); |
253 } | 254 } |
254 | 255 |
255 void SetSmiValueField(int field_position, int value) { | 256 void SetSmiValueField(int field_position, int value) { |
256 SetField(field_position, Handle<Smi>(Smi::FromInt(value), isolate())); | 257 SetField(field_position, Handle<Smi>(Smi::FromInt(value), isolate())); |
257 } | 258 } |
258 | 259 |
259 Handle<Object> GetField(int field_position) { | 260 Handle<Object> GetField(int field_position) { |
260 return Object::GetElement( | 261 return Object::GetElement( |
261 isolate(), array_, field_position).ToHandleChecked(); | 262 isolate(), array_, field_position).ToHandleChecked(); |
262 } | 263 } |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 static const int kEndPositionOffset_ = 2; | 363 static const int kEndPositionOffset_ = 2; |
363 static const int kSharedInfoOffset_ = 3; | 364 static const int kSharedInfoOffset_ = 3; |
364 static const int kSize_ = 4; | 365 static const int kSize_ = 4; |
365 | 366 |
366 friend class JSArrayBasedStruct<SharedInfoWrapper>; | 367 friend class JSArrayBasedStruct<SharedInfoWrapper>; |
367 }; | 368 }; |
368 | 369 |
369 } } // namespace v8::internal | 370 } } // namespace v8::internal |
370 | 371 |
371 #endif /* V*_LIVEEDIT_H_ */ | 372 #endif /* V*_LIVEEDIT_H_ */ |
OLD | NEW |