| Index: src/handles.h
|
| ===================================================================
|
| --- src/handles.h (revision 7006)
|
| +++ src/handles.h (working copy)
|
| @@ -39,7 +39,7 @@
|
| // Handles are only valid within a HandleScope.
|
| // When a handle is created for an object a cell is allocated in the heap.
|
|
|
| -template<class T>
|
| +template<typename T>
|
| class Handle {
|
| public:
|
| INLINE(explicit Handle(T** location)) { location_ = location; }
|
| @@ -127,6 +127,13 @@
|
| static Address current_limit_address();
|
| static Address current_level_address();
|
|
|
| + // Closes the HandleScope (invalidating all handles
|
| + // created in the scope of the HandleScope) and returns
|
| + // a Handle backed by the parent scope holding the
|
| + // value of the argument handle.
|
| + template <typename T>
|
| + Handle<T> CloseAndEscape(Handle<T> handle_value);
|
| +
|
| private:
|
| // Prevent heap allocation or illegal handle scopes.
|
| HandleScope(const HandleScope&);
|
| @@ -134,6 +141,8 @@
|
| void* operator new(size_t size);
|
| void operator delete(void* size_t);
|
|
|
| + inline void CloseScope();
|
| +
|
| Isolate* isolate_;
|
| Object** prev_next_;
|
| Object** prev_limit_;
|
| @@ -176,12 +185,14 @@
|
| Handle<Object> SetProperty(Handle<JSObject> object,
|
| Handle<String> key,
|
| Handle<Object> value,
|
| - PropertyAttributes attributes);
|
| + PropertyAttributes attributes,
|
| + StrictModeFlag strict);
|
|
|
| Handle<Object> SetProperty(Handle<Object> object,
|
| Handle<Object> key,
|
| Handle<Object> value,
|
| - PropertyAttributes attributes);
|
| + PropertyAttributes attributes,
|
| + StrictModeFlag strict);
|
|
|
| Handle<Object> ForceSetProperty(Handle<JSObject> object,
|
| Handle<Object> key,
|
| @@ -202,10 +213,18 @@
|
| Handle<Object> value,
|
| PropertyAttributes attributes);
|
|
|
| +// Used to set local properties on the object we totally control
|
| +// and which therefore has no accessors and alikes.
|
| +void SetLocalPropertyNoThrow(Handle<JSObject> object,
|
| + Handle<String> key,
|
| + Handle<Object> value,
|
| + PropertyAttributes attributes = NONE);
|
| +
|
| Handle<Object> SetPropertyWithInterceptor(Handle<JSObject> object,
|
| Handle<String> key,
|
| Handle<Object> value,
|
| - PropertyAttributes attributes);
|
| + PropertyAttributes attributes,
|
| + StrictModeFlag strict);
|
|
|
| Handle<Object> SetElement(Handle<JSObject> object,
|
| uint32_t index,
|
| @@ -326,7 +345,9 @@
|
|
|
| bool CompileLazyInLoop(Handle<JSFunction> function, ClearExceptionFlag flag);
|
|
|
| -bool CompileOptimized(Handle<JSFunction> function, int osr_ast_id);
|
| +bool CompileOptimized(Handle<JSFunction> function,
|
| + int osr_ast_id,
|
| + ClearExceptionFlag flag);
|
|
|
| class NoHandleAllocation BASE_EMBEDDED {
|
| public:
|
|
|