| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 5879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5890 int length, | 5890 int length, |
| 5891 bool is_construct_call) | 5891 bool is_construct_call) |
| 5892 : implicit_args_(implicit_args), | 5892 : implicit_args_(implicit_args), |
| 5893 values_(values), | 5893 values_(values), |
| 5894 length_(length), | 5894 length_(length), |
| 5895 is_construct_call_(is_construct_call) { } | 5895 is_construct_call_(is_construct_call) { } |
| 5896 | 5896 |
| 5897 | 5897 |
| 5898 template<typename T> | 5898 template<typename T> |
| 5899 Local<Value> FunctionCallbackInfo<T>::operator[](int i) const { | 5899 Local<Value> FunctionCallbackInfo<T>::operator[](int i) const { |
| 5900 if (i < 0 || length_ <= i) return Local<Value>(*Undefined()); | 5900 if (i < 0 || length_ <= i) return Local<Value>(*Undefined(GetIsolate())); |
| 5901 return Local<Value>(reinterpret_cast<Value*>(values_ - i)); | 5901 return Local<Value>(reinterpret_cast<Value*>(values_ - i)); |
| 5902 } | 5902 } |
| 5903 | 5903 |
| 5904 | 5904 |
| 5905 template<typename T> | 5905 template<typename T> |
| 5906 Local<Function> FunctionCallbackInfo<T>::Callee() const { | 5906 Local<Function> FunctionCallbackInfo<T>::Callee() const { |
| 5907 return Local<Function>(reinterpret_cast<Function*>( | 5907 return Local<Function>(reinterpret_cast<Function*>( |
| 5908 &implicit_args_[kCalleeIndex])); | 5908 &implicit_args_[kCalleeIndex])); |
| 5909 } | 5909 } |
| 5910 | 5910 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5972 Handle<Integer> ScriptOrigin::ResourceColumnOffset() const { | 5972 Handle<Integer> ScriptOrigin::ResourceColumnOffset() const { |
| 5973 return resource_column_offset_; | 5973 return resource_column_offset_; |
| 5974 } | 5974 } |
| 5975 | 5975 |
| 5976 Handle<Boolean> ScriptOrigin::ResourceIsSharedCrossOrigin() const { | 5976 Handle<Boolean> ScriptOrigin::ResourceIsSharedCrossOrigin() const { |
| 5977 return resource_is_shared_cross_origin_; | 5977 return resource_is_shared_cross_origin_; |
| 5978 } | 5978 } |
| 5979 | 5979 |
| 5980 | 5980 |
| 5981 Handle<Boolean> Boolean::New(bool value) { | 5981 Handle<Boolean> Boolean::New(bool value) { |
| 5982 return value ? True() : False(); | 5982 Isolate* isolate = Isolate::GetCurrent(); |
| 5983 return value ? True(isolate) : False(isolate); |
| 5983 } | 5984 } |
| 5984 | 5985 |
| 5985 | 5986 |
| 5986 void Template::Set(const char* name, v8::Handle<Data> value) { | 5987 void Template::Set(const char* name, v8::Handle<Data> value) { |
| 5987 Set(v8::String::New(name), value); | 5988 Set(v8::String::New(name), value); |
| 5988 } | 5989 } |
| 5989 | 5990 |
| 5990 | 5991 |
| 5991 Local<Value> Object::GetInternalField(int index) { | 5992 Local<Value> Object::GetInternalField(int index) { |
| 5992 #ifndef V8_ENABLE_CHECKS | 5993 #ifndef V8_ENABLE_CHECKS |
| (...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6481 */ | 6482 */ |
| 6482 | 6483 |
| 6483 | 6484 |
| 6484 } // namespace v8 | 6485 } // namespace v8 |
| 6485 | 6486 |
| 6486 | 6487 |
| 6487 #undef TYPE_CHECK | 6488 #undef TYPE_CHECK |
| 6488 | 6489 |
| 6489 | 6490 |
| 6490 #endif // V8_H_ | 6491 #endif // V8_H_ |
| OLD | NEW |