v8.h | v8.h | |||
---|---|---|---|---|
skipping to change at line 917 | skipping to change at line 917 | |||
/** | /** | |||
* The superclass of values and API object templates. | * The superclass of values and API object templates. | |||
*/ | */ | |||
class V8_EXPORT Data { | class V8_EXPORT Data { | |||
private: | private: | |||
Data(); | Data(); | |||
}; | }; | |||
/** | /** | |||
* Pre-compilation data that can be associated with a script. This | ||||
* data can be calculated for a script in advance of actually | ||||
* compiling it, and can be stored between compilations. When script | ||||
* data is given to the compile method compilation will be faster. | ||||
*/ | ||||
class V8_EXPORT ScriptData { // NOLINT | ||||
public: | ||||
virtual ~ScriptData() { } | ||||
/** | ||||
* Pre-compiles the specified script (context-independent). | ||||
* | ||||
* NOTE: Pre-compilation using this method cannot happen on another threa | ||||
d | ||||
* without using Lockers. | ||||
* | ||||
* \param source Script source code. | ||||
*/ | ||||
static ScriptData* PreCompile(Handle<String> source); | ||||
/** | ||||
* Load previous pre-compilation data. | ||||
* | ||||
* \param data Pointer to data returned by a call to Data() of a previous | ||||
* ScriptData. Ownership is not transferred. | ||||
* \param length Length of data. | ||||
*/ | ||||
static ScriptData* New(const char* data, int length); | ||||
/** | ||||
* Returns the length of Data(). | ||||
*/ | ||||
virtual int Length() = 0; | ||||
/** | ||||
* Returns a serialized representation of this ScriptData that can later | ||||
be | ||||
* passed to New(). NOTE: Serialized data is platform-dependent. | ||||
*/ | ||||
virtual const char* Data() = 0; | ||||
/** | ||||
* Returns true if the source code could not be parsed. | ||||
*/ | ||||
virtual bool HasError() = 0; | ||||
}; | ||||
/** | ||||
* The origin, within a file, of a script. | * The origin, within a file, of a script. | |||
*/ | */ | |||
class ScriptOrigin { | class ScriptOrigin { | |||
public: | public: | |||
V8_INLINE ScriptOrigin( | V8_INLINE ScriptOrigin( | |||
Handle<Value> resource_name, | Handle<Value> resource_name, | |||
Handle<Integer> resource_line_offset = Handle<Integer>(), | Handle<Integer> resource_line_offset = Handle<Integer>(), | |||
Handle<Integer> resource_column_offset = Handle<Integer>(), | Handle<Integer> resource_column_offset = Handle<Integer>(), | |||
Handle<Boolean> resource_is_shared_cross_origin = Handle<Boolean>()) | Handle<Boolean> resource_is_shared_cross_origin = Handle<Boolean>()) | |||
: resource_name_(resource_name), | : resource_name_(resource_name), | |||
skipping to change at line 1017 | skipping to change at line 971 | |||
}; | }; | |||
/** | /** | |||
* A compiled JavaScript script, tied to a Context which was active when th e | * A compiled JavaScript script, tied to a Context which was active when th e | |||
* script was compiled. | * script was compiled. | |||
*/ | */ | |||
class V8_EXPORT Script { | class V8_EXPORT Script { | |||
public: | public: | |||
/** | /** | |||
* A shorthand for ScriptCompiler::Compile(). | * A shorthand for ScriptCompiler::Compile(). | |||
* The ScriptData parameter will be deprecated; use ScriptCompiler::Compi | ||||
le if | ||||
* you want to pass it. | ||||
*/ | */ | |||
static Local<Script> Compile(Handle<String> source, | static Local<Script> Compile(Handle<String> source, | |||
ScriptOrigin* origin = NULL, | ScriptOrigin* origin = NULL); | |||
ScriptData* script_data = NULL); | ||||
// To be decprecated, use the Compile above. | // To be decprecated, use the Compile above. | |||
static Local<Script> Compile(Handle<String> source, | static Local<Script> Compile(Handle<String> source, | |||
Handle<String> file_name); | Handle<String> file_name); | |||
/** | /** | |||
* Runs the script returning the resulting value. It will be run in the | * Runs the script returning the resulting value. It will be run in the | |||
* context in which it was created (ScriptCompiler::CompileBound or | * context in which it was created (ScriptCompiler::CompileBound or | |||
* UnboundScript::BindToGlobalContext()). | * UnboundScript::BindToGlobalContext()). | |||
*/ | */ | |||
End of changes. 3 change blocks. | ||||
53 lines changed or deleted | 1 lines changed or added | |||