v8.h   v8.h 
skipping to change at line 526 skipping to change at line 526
Handle<Integer> resource_line_offset_; Handle<Integer> resource_line_offset_;
Handle<Integer> resource_column_offset_; Handle<Integer> resource_column_offset_;
}; };
/** /**
* A compiled JavaScript script. * A compiled JavaScript script.
*/ */
class V8EXPORT Script { class V8EXPORT Script {
public: public:
/** /**
* Compiles the specified script. The ScriptOrigin* and ScriptData* * Compiles the specified script (context-independent).
* parameters are owned by the caller of Script::Compile. No *
* references to these objects are kept after compilation finishes. * \param source Script source code.
* * \param origin Script origin, owned by caller, no references are kept
* The script object returned is context independent; when run it * when New() returns
* will use the currently entered context. * \param pre_data Pre-parsing data, as obtained by ScriptData::PreCompil
*/ e()
static Local<Script> New(Handle<String> source, * using pre_data speeds compilation if it's done multiple times.
ScriptOrigin* origin = NULL, * Owned by caller, no references are kept when New() returns.
ScriptData* pre_data = NULL); * \param script_data Arbitrary data associated with script. Using
* this has same effect as calling SetData(), but allows data to be
* available to compile event handlers.
* \return Compiled script object (context independent; when run it
* will use the currently entered context).
*/
static Local<Script> New(Handle<String> source,
ScriptOrigin* origin = NULL,
ScriptData* pre_data = NULL,
Handle<String> script_data = Handle<String>());
/** /**
* Compiles the specified script using the specified file name * Compiles the specified script using the specified file name
* object (typically a string) as the script's origin. * object (typically a string) as the script's origin.
* *
* The script object returned is context independent; when run it * \param source Script source code.
* will use the currently entered context. * \patam file_name file name object (typically a string) to be used
*/ * as the script's origin.
static Local<Script> New(Handle<String> source, * \return Compiled script object (context independent; when run it
Handle<Value> file_name); * will use the currently entered context).
*/
static Local<Script> New(Handle<String> source,
Handle<Value> file_name);
/** /**
* Compiles the specified script. The ScriptOrigin* and ScriptData* * Compiles the specified script (bound to current context).
* parameters are owned by the caller of Script::Compile. No
* references to these objects are kept after compilation finishes.
* *
* The script object returned is bound to the context that was active * \param source Script source code.
* when this function was called. When run it will always use this * \param origin Script origin, owned by caller, no references are kept
* context. * when Compile() returns
* \param pre_data Pre-parsing data, as obtained by ScriptData::PreCompil
e()
* using pre_data speeds compilation if it's done multiple times.
* Owned by caller, no references are kept when Compile() returns.
* \param script_data Arbitrary data associated with script. Using
* this has same effect as calling SetData(), but makes data available
* earlier (i.e. to compile event handlers).
* \return Compiled script object, bound to the context that was active
* when this function was called. When run it will always use this
* context.
*/ */
static Local<Script> Compile(Handle<String> source, static Local<Script> Compile(Handle<String> source,
ScriptOrigin* origin = NULL, ScriptOrigin* origin = NULL,
ScriptData* pre_data = NULL); ScriptData* pre_data = NULL,
Handle<String> script_data = Handle<String>(
));
/** /**
* Compiles the specified script using the specified file name * Compiles the specified script using the specified file name
* object (typically a string) as the script's origin. * object (typically a string) as the script's origin.
* *
* The script object returned is bound to the context that was active * \param source Script source code.
* when this function was called. When run it will always use this * \param file_name File name to use as script's origin
* context. * \param script_data Arbitrary data associated with script. Using
* this has same effect as calling SetData(), but makes data available
* earlier (i.e. to compile event handlers).
* \return Compiled script object, bound to the context that was active
* when this function was called. When run it will always use this
* context.
*/ */
static Local<Script> Compile(Handle<String> source, static Local<Script> Compile(Handle<String> source,
Handle<Value> file_name); Handle<Value> file_name,
Handle<String> script_data = Handle<String>(
));
/** /**
* Runs the script returning the resulting value. If the script is * Runs the script returning the resulting value. If the script is
* context independent (created using ::New) it will be run in the * context independent (created using ::New) it will be run in the
* currently entered context. If it is context specific (created * currently entered context. If it is context specific (created
* using ::Compile) it will be run in the context in which it was * using ::Compile) it will be run in the context in which it was
* compiled. * compiled.
*/ */
Local<Value> Run(); Local<Value> Run();
skipping to change at line 1177 skipping to change at line 1202
Local<Array> GetPropertyNames(); Local<Array> GetPropertyNames();
/** /**
* Get the prototype object. This does not skip objects marked to * Get the prototype object. This does not skip objects marked to
* be skipped by __proto__ and it does not consult the security * be skipped by __proto__ and it does not consult the security
* handler. * handler.
*/ */
Local<Value> GetPrototype(); Local<Value> GetPrototype();
/** /**
* Set the prototype object. This does not skip objects marked to
* be skipped by __proto__ and it does not consult the security
* handler.
*/
bool SetPrototype(Handle<Value> prototype);
/**
* Finds an instance of the given function template in the prototype * Finds an instance of the given function template in the prototype
* chain. * chain.
*/ */
Local<Object> FindInstanceInPrototypeChain(Handle<FunctionTemplate> tmpl) ; Local<Object> FindInstanceInPrototypeChain(Handle<FunctionTemplate> tmpl) ;
/** /**
* Call builtin Object.prototype.toString on this object. * Call builtin Object.prototype.toString on this object.
* This is different from Value::ToString() that may call * This is different from Value::ToString() that may call
* user-defined toString function. This one does not. * user-defined toString function. This one does not.
*/ */
skipping to change at line 1332 skipping to change at line 1364
/** /**
* A JavaScript function object (ECMA-262, 15.3). * A JavaScript function object (ECMA-262, 15.3).
*/ */
class V8EXPORT Function : public Object { class V8EXPORT Function : public Object {
public: public:
Local<Object> NewInstance() const; Local<Object> NewInstance() const;
Local<Object> NewInstance(int argc, Handle<Value> argv[]) const; Local<Object> NewInstance(int argc, Handle<Value> argv[]) const;
Local<Value> Call(Handle<Object> recv, int argc, Handle<Value> argv[]); Local<Value> Call(Handle<Object> recv, int argc, Handle<Value> argv[]);
void SetName(Handle<String> name); void SetName(Handle<String> name);
Handle<Value> GetName() const; Handle<Value> GetName() const;
/**
* Returns zero based line number of function body and
* kLineOffsetNotFound if no information available.
*/
int GetScriptLineNumber() const;
ScriptOrigin GetScriptOrigin() const;
static inline Function* Cast(Value* obj); static inline Function* Cast(Value* obj);
static const int kLineOffsetNotFound;
private: private:
Function(); Function();
static void CheckCast(Value* obj); static void CheckCast(Value* obj);
}; };
/** /**
* A JavaScript value that wraps a C++ void*. This type of value is * A JavaScript value that wraps a C++ void*. This type of value is
* mainly used to associate C++ data structures with JavaScript * mainly used to associate C++ data structures with JavaScript
* objects. * objects.
* *
skipping to change at line 2247 skipping to change at line 2287
* See also PauseProfiler(). * See also PauseProfiler().
*/ */
static void ResumeProfiler(); static void ResumeProfiler();
/** /**
* Return whether profiler is currently paused. * Return whether profiler is currently paused.
*/ */
static bool IsProfilerPaused(); static bool IsProfilerPaused();
/** /**
* Resumes specified profiler modules. * Resumes specified profiler modules. Can be called several times to
* mark the opening of a profiler events block with the given tag.
*
* "ResumeProfiler" is equivalent to "ResumeProfilerEx(PROFILER_MODULE_CP U)". * "ResumeProfiler" is equivalent to "ResumeProfilerEx(PROFILER_MODULE_CP U)".
* See ProfilerModules enum. * See ProfilerModules enum.
* *
* \param flags Flags specifying profiler modules. * \param flags Flags specifying profiler modules.
* \param tag Profile tag.
*/ */
static void ResumeProfilerEx(int flags); static void ResumeProfilerEx(int flags, int tag = 0);
/** /**
* Pauses specified profiler modules. * Pauses specified profiler modules. Each call to "PauseProfilerEx" clos
es
* a block of profiler events opened by a call to "ResumeProfilerEx" with
the
* same tag value. There is no need for blocks to be properly nested.
* The profiler is paused when the last opened block is closed.
*
* "PauseProfiler" is equivalent to "PauseProfilerEx(PROFILER_MODULE_CPU) ". * "PauseProfiler" is equivalent to "PauseProfilerEx(PROFILER_MODULE_CPU) ".
* See ProfilerModules enum. * See ProfilerModules enum.
* *
* \param flags Flags specifying profiler modules. * \param flags Flags specifying profiler modules.
* \param tag Profile tag.
*/ */
static void PauseProfilerEx(int flags); static void PauseProfilerEx(int flags, int tag = 0);
/** /**
* Returns active (resumed) profiler modules. * Returns active (resumed) profiler modules.
* See ProfilerModules enum. * See ProfilerModules enum.
* *
* \returns active profiler modules. * \returns active profiler modules.
*/ */
static int GetActiveProfilerModules(); static int GetActiveProfilerModules();
/** /**
 End of changes. 16 change blocks. 
35 lines changed or deleted 89 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/