| 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 /** \mainpage V8 API Reference Guide |     5 /** \mainpage V8 API Reference Guide | 
|     6  * |     6  * | 
|     7  * V8 is Google's open source JavaScript engine. |     7  * V8 is Google's open source JavaScript engine. | 
|     8  * |     8  * | 
|     9  * This set of documents provides reference material generated from the |     9  * This set of documents provides reference material generated from the | 
|    10  * V8 header file, include/v8.h. |    10  * V8 header file, include/v8.h. | 
| (...skipping 944 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   955   Data(); |   955   Data(); | 
|   956 }; |   956 }; | 
|   957  |   957  | 
|   958  |   958  | 
|   959 /** |   959 /** | 
|   960  * The optional attributes of ScriptOrigin. |   960  * The optional attributes of ScriptOrigin. | 
|   961  */ |   961  */ | 
|   962 class ScriptOriginOptions { |   962 class ScriptOriginOptions { | 
|   963  public: |   963  public: | 
|   964   V8_INLINE ScriptOriginOptions(bool is_shared_cross_origin = false, |   964   V8_INLINE ScriptOriginOptions(bool is_shared_cross_origin = false, | 
|   965                                 bool is_opaque = false) |   965                                 bool is_opaque = false, bool is_wasm = false) | 
|   966       : flags_((is_shared_cross_origin ? kIsSharedCrossOrigin : 0) | |   966       : flags_((is_shared_cross_origin ? kIsSharedCrossOrigin : 0) | | 
|   967                (is_opaque ? kIsOpaque : 0)) {} |   967                (is_wasm ? kIsWasm : 0) | (is_opaque ? kIsOpaque : 0)) {} | 
|   968   V8_INLINE ScriptOriginOptions(int flags) |   968   V8_INLINE ScriptOriginOptions(int flags) | 
|   969       : flags_(flags & (kIsSharedCrossOrigin | kIsOpaque)) {} |   969       : flags_(flags & (kIsSharedCrossOrigin | kIsOpaque | kIsWasm)) {} | 
|   970   bool IsSharedCrossOrigin() const { |   970   bool IsSharedCrossOrigin() const { | 
|   971     return (flags_ & kIsSharedCrossOrigin) != 0; |   971     return (flags_ & kIsSharedCrossOrigin) != 0; | 
|   972   } |   972   } | 
|   973   bool IsOpaque() const { return (flags_ & kIsOpaque) != 0; } |   973   bool IsOpaque() const { return (flags_ & kIsOpaque) != 0; } | 
 |   974   bool IsWasm() const { return (flags_ & kIsWasm) != 0; } | 
|   974   int Flags() const { return flags_; } |   975   int Flags() const { return flags_; } | 
|   975  |   976  | 
|   976  private: |   977  private: | 
|   977   enum { kIsSharedCrossOrigin = 1, kIsOpaque = 1 << 1 }; |   978   enum { kIsSharedCrossOrigin = 1, kIsOpaque = 1 << 1, kIsWasm = 1 << 2 }; | 
|   978   const int flags_; |   979   const int flags_; | 
|   979 }; |   980 }; | 
|   980  |   981  | 
|   981 /** |   982 /** | 
|   982  * The origin, within a file, of a script. |   983  * The origin, within a file, of a script. | 
|   983  */ |   984  */ | 
|   984 class ScriptOrigin { |   985 class ScriptOrigin { | 
|   985  public: |   986  public: | 
|   986   V8_INLINE ScriptOrigin( |   987   V8_INLINE ScriptOrigin( | 
|   987       Local<Value> resource_name, |   988       Local<Value> resource_name, | 
|   988       Local<Integer> resource_line_offset = Local<Integer>(), |   989       Local<Integer> resource_line_offset = Local<Integer>(), | 
|   989       Local<Integer> resource_column_offset = Local<Integer>(), |   990       Local<Integer> resource_column_offset = Local<Integer>(), | 
|   990       Local<Boolean> resource_is_shared_cross_origin = Local<Boolean>(), |   991       Local<Boolean> resource_is_shared_cross_origin = Local<Boolean>(), | 
|   991       Local<Integer> script_id = Local<Integer>(), |   992       Local<Integer> script_id = Local<Integer>(), | 
|   992       Local<Value> source_map_url = Local<Value>(), |   993       Local<Value> source_map_url = Local<Value>(), | 
|   993       Local<Boolean> resource_is_opaque = Local<Boolean>()); |   994       Local<Boolean> resource_is_opaque = Local<Boolean>(), | 
 |   995       Local<Boolean> is_wasm = Local<Boolean>()); | 
|   994  |   996  | 
|   995   V8_INLINE Local<Value> ResourceName() const; |   997   V8_INLINE Local<Value> ResourceName() const; | 
|   996   V8_INLINE Local<Integer> ResourceLineOffset() const; |   998   V8_INLINE Local<Integer> ResourceLineOffset() const; | 
|   997   V8_INLINE Local<Integer> ResourceColumnOffset() const; |   999   V8_INLINE Local<Integer> ResourceColumnOffset() const; | 
|   998   /** |  1000   /** | 
|   999     * Returns true for embedder's debugger scripts |  1001     * Returns true for embedder's debugger scripts | 
|  1000     */ |  1002     */ | 
|  1001   V8_INLINE Local<Integer> ScriptID() const; |  1003   V8_INLINE Local<Integer> ScriptID() const; | 
|  1002   V8_INLINE Local<Value> SourceMapUrl() const; |  1004   V8_INLINE Local<Value> SourceMapUrl() const; | 
|  1003   V8_INLINE ScriptOriginOptions Options() const { return options_; } |  1005   V8_INLINE ScriptOriginOptions Options() const { return options_; } | 
| (...skipping 7808 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  8812 int FunctionCallbackInfo<T>::Length() const { |  8814 int FunctionCallbackInfo<T>::Length() const { | 
|  8813   return length_; |  8815   return length_; | 
|  8814 } |  8816 } | 
|  8815  |  8817  | 
|  8816 ScriptOrigin::ScriptOrigin(Local<Value> resource_name, |  8818 ScriptOrigin::ScriptOrigin(Local<Value> resource_name, | 
|  8817                            Local<Integer> resource_line_offset, |  8819                            Local<Integer> resource_line_offset, | 
|  8818                            Local<Integer> resource_column_offset, |  8820                            Local<Integer> resource_column_offset, | 
|  8819                            Local<Boolean> resource_is_shared_cross_origin, |  8821                            Local<Boolean> resource_is_shared_cross_origin, | 
|  8820                            Local<Integer> script_id, |  8822                            Local<Integer> script_id, | 
|  8821                            Local<Value> source_map_url, |  8823                            Local<Value> source_map_url, | 
|  8822                            Local<Boolean> resource_is_opaque) |  8824                            Local<Boolean> resource_is_opaque, | 
 |  8825                            Local<Boolean> is_wasm) | 
|  8823     : resource_name_(resource_name), |  8826     : resource_name_(resource_name), | 
|  8824       resource_line_offset_(resource_line_offset), |  8827       resource_line_offset_(resource_line_offset), | 
|  8825       resource_column_offset_(resource_column_offset), |  8828       resource_column_offset_(resource_column_offset), | 
|  8826       options_(!resource_is_shared_cross_origin.IsEmpty() && |  8829       options_(!resource_is_shared_cross_origin.IsEmpty() && | 
|  8827                    resource_is_shared_cross_origin->IsTrue(), |  8830                    resource_is_shared_cross_origin->IsTrue(), | 
|  8828                !resource_is_opaque.IsEmpty() && resource_is_opaque->IsTrue()), |  8831                !resource_is_opaque.IsEmpty() && resource_is_opaque->IsTrue(), | 
 |  8832                !is_wasm.IsEmpty() && is_wasm->IsTrue()), | 
|  8829       script_id_(script_id), |  8833       script_id_(script_id), | 
|  8830       source_map_url_(source_map_url) {} |  8834       source_map_url_(source_map_url) {} | 
|  8831  |  8835  | 
|  8832 Local<Value> ScriptOrigin::ResourceName() const { return resource_name_; } |  8836 Local<Value> ScriptOrigin::ResourceName() const { return resource_name_; } | 
|  8833  |  8837  | 
|  8834  |  8838  | 
|  8835 Local<Integer> ScriptOrigin::ResourceLineOffset() const { |  8839 Local<Integer> ScriptOrigin::ResourceLineOffset() const { | 
|  8836   return resource_line_offset_; |  8840   return resource_line_offset_; | 
|  8837 } |  8841 } | 
|  8838  |  8842  | 
| (...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  9647  */ |  9651  */ | 
|  9648  |  9652  | 
|  9649  |  9653  | 
|  9650 }  // namespace v8 |  9654 }  // namespace v8 | 
|  9651  |  9655  | 
|  9652  |  9656  | 
|  9653 #undef TYPE_CHECK |  9657 #undef TYPE_CHECK | 
|  9654  |  9658  | 
|  9655  |  9659  | 
|  9656 #endif  // INCLUDE_V8_H_ |  9660 #endif  // INCLUDE_V8_H_ | 
| OLD | NEW |