| v8.h | v8.h | |||
|---|---|---|---|---|
| skipping to change at line 1023 | skipping to change at line 1023 | |||
| CachedData(const uint8_t* data, int length, | CachedData(const uint8_t* data, int length, | |||
| BufferPolicy buffer_policy = BufferNotOwned); | BufferPolicy buffer_policy = BufferNotOwned); | |||
| ~CachedData(); | ~CachedData(); | |||
| // TODO(marja): Async compilation; add constructors which take a callba ck | // TODO(marja): Async compilation; add constructors which take a callba ck | |||
| // which will be called when V8 no longer needs the data. | // which will be called when V8 no longer needs the data. | |||
| const uint8_t* data; | const uint8_t* data; | |||
| int length; | int length; | |||
| BufferPolicy buffer_policy; | BufferPolicy buffer_policy; | |||
| private: | private: | |||
| // Prevent copying. Not implemented. | // Prevent copying. Not implemented. | |||
| CachedData(const CachedData&); | CachedData(const CachedData&); | |||
| CachedData& operator=(const CachedData&); | CachedData& operator=(const CachedData&); | |||
| }; | }; | |||
| /** | /** | |||
| * Source code which can be then compiled to a UnboundScript or | * Source code which can be then compiled to a UnboundScript or | |||
| * BoundScript. | * BoundScript. | |||
| */ | */ | |||
| class Source { | class Source { | |||
| public: | public: | |||
| // Source takes ownership of CachedData. | // Source takes ownership of CachedData. | |||
| V8_INLINE Source(Local<String> source_string, const ScriptOrigin& origi n, | V8_INLINE Source(Local<String> source_string, const ScriptOrigin& origi n, | |||
| skipping to change at line 1048 | skipping to change at line 1048 | |||
| CachedData* cached_data = NULL); | CachedData* cached_data = NULL); | |||
| V8_INLINE ~Source(); | V8_INLINE ~Source(); | |||
| // Ownership of the CachedData or its buffers is *not* transferred to t he | // Ownership of the CachedData or its buffers is *not* transferred to t he | |||
| // caller. The CachedData object is alive as long as the Source object is | // caller. The CachedData object is alive as long as the Source object is | |||
| // alive. | // alive. | |||
| V8_INLINE const CachedData* GetCachedData() const; | V8_INLINE const CachedData* GetCachedData() const; | |||
| private: | private: | |||
| friend class ScriptCompiler; | friend class ScriptCompiler; | |||
| // Prevent copying. Not implemented. | // Prevent copying. Not implemented. | |||
| Source(const Source&); | Source(const Source&); | |||
| Source& operator=(const Source&); | Source& operator=(const Source&); | |||
| Local<String> source_string; | Local<String> source_string; | |||
| // Origin information | // Origin information | |||
| Handle<Value> resource_name; | Handle<Value> resource_name; | |||
| Handle<Integer> resource_line_offset; | Handle<Integer> resource_line_offset; | |||
| Handle<Integer> resource_column_offset; | Handle<Integer> resource_column_offset; | |||
| Handle<Boolean> resource_is_shared_cross_origin; | Handle<Boolean> resource_is_shared_cross_origin; | |||
| skipping to change at line 2457 | skipping to change at line 2457 | |||
| /** | /** | |||
| * The information passed to a property callback about the context | * The information passed to a property callback about the context | |||
| * of the property access. | * of the property access. | |||
| */ | */ | |||
| template<typename T> | template<typename T> | |||
| class PropertyCallbackInfo { | class PropertyCallbackInfo { | |||
| public: | public: | |||
| V8_INLINE Isolate* GetIsolate() const; | V8_INLINE Isolate* GetIsolate() const; | |||
| V8_INLINE Local<Value> Data() const; | V8_INLINE Local<Value> Data() const; | |||
| V8_INLINE Local<Value> This() const; | V8_INLINE Local<Object> This() const; | |||
| V8_INLINE Local<Object> Holder() const; | V8_INLINE Local<Object> Holder() const; | |||
| V8_INLINE ReturnValue<T> GetReturnValue() const; | V8_INLINE ReturnValue<T> GetReturnValue() const; | |||
| // This shouldn't be public, but the arm compiler needs it. | // This shouldn't be public, but the arm compiler needs it. | |||
| static const int kArgsLength = 6; | static const int kArgsLength = 6; | |||
| protected: | protected: | |||
| friend class MacroAssembler; | friend class MacroAssembler; | |||
| friend class internal::PropertyCallbackArguments; | friend class internal::PropertyCallbackArguments; | |||
| friend class internal::CustomArguments<PropertyCallbackInfo>; | friend class internal::CustomArguments<PropertyCallbackInfo>; | |||
| static const int kHolderIndex = 0; | static const int kHolderIndex = 0; | |||
| skipping to change at line 6283 | skipping to change at line 6283 | |||
| Isolate* PropertyCallbackInfo<T>::GetIsolate() const { | Isolate* PropertyCallbackInfo<T>::GetIsolate() const { | |||
| return *reinterpret_cast<Isolate**>(&args_[kIsolateIndex]); | return *reinterpret_cast<Isolate**>(&args_[kIsolateIndex]); | |||
| } | } | |||
| template<typename T> | template<typename T> | |||
| Local<Value> PropertyCallbackInfo<T>::Data() const { | Local<Value> PropertyCallbackInfo<T>::Data() const { | |||
| return Local<Value>(reinterpret_cast<Value*>(&args_[kDataIndex])); | return Local<Value>(reinterpret_cast<Value*>(&args_[kDataIndex])); | |||
| } | } | |||
| template<typename T> | template<typename T> | |||
| Local<Value> PropertyCallbackInfo<T>::This() const { | Local<Object> PropertyCallbackInfo<T>::This() const { | |||
| return Local<Value>(reinterpret_cast<Value*>(&args_[kThisIndex])); | return Local<Object>(reinterpret_cast<Object*>(&args_[kThisIndex])); | |||
| } | } | |||
| template<typename T> | template<typename T> | |||
| Local<Object> PropertyCallbackInfo<T>::Holder() const { | Local<Object> PropertyCallbackInfo<T>::Holder() const { | |||
| return Local<Object>(reinterpret_cast<Object*>(&args_[kHolderIndex])); | return Local<Object>(reinterpret_cast<Object*>(&args_[kHolderIndex])); | |||
| } | } | |||
| template<typename T> | template<typename T> | |||
| ReturnValue<T> PropertyCallbackInfo<T>::GetReturnValue() const { | ReturnValue<T> PropertyCallbackInfo<T>::GetReturnValue() const { | |||
| return ReturnValue<T>(&args_[kReturnValueIndex]); | return ReturnValue<T>(&args_[kReturnValueIndex]); | |||
| End of changes. 4 change blocks. | ||||
| 7 lines changed or deleted | 7 lines changed or added | |||