| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2012 Ericsson AB. All rights reserved. | 3 * Copyright (C) 2012 Ericsson AB. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 645 if (value->IsArray()) { | 645 if (value->IsArray()) { |
| 646 length = v8::Local<v8::Array>::Cast(v8Value)->Length(); | 646 length = v8::Local<v8::Array>::Cast(v8Value)->Length(); |
| 647 } else if (toV8Sequence(value, length, isolate).IsEmpty()) { | 647 } else if (toV8Sequence(value, length, isolate).IsEmpty()) { |
| 648 throwTypeError(ExceptionMessages::notASequenceTypeProperty(propertyName)
, isolate); | 648 throwTypeError(ExceptionMessages::notASequenceTypeProperty(propertyName)
, isolate); |
| 649 return Vector<RefPtr<T> >(); | 649 return Vector<RefPtr<T> >(); |
| 650 } | 650 } |
| 651 return toRefPtrNativeArrayUnchecked<T, V8T>(v8Value, length, isolate, succes
s); | 651 return toRefPtrNativeArrayUnchecked<T, V8T>(v8Value, length, isolate, succes
s); |
| 652 } | 652 } |
| 653 | 653 |
| 654 template <class T, class V8T> | 654 template <class T, class V8T> |
| 655 HeapVector<Member<T> > toRefPtrWillBeMemberNativeArray(v8::Handle<v8::Value> val
ue, int argumentIndex, v8::Isolate* isolate, bool* success = 0) | 655 WillBeHeapVector<RefPtrWillBeMember<T> > toRefPtrWillBeMemberNativeArray(v8::Han
dle<v8::Value> value, int argumentIndex, v8::Isolate* isolate, bool* success = 0
) |
| 656 { | 656 { |
| 657 if (success) | 657 if (success) |
| 658 *success = true; | 658 *success = true; |
| 659 | 659 |
| 660 v8::Local<v8::Value> v8Value(v8::Local<v8::Value>::New(isolate, value)); | 660 v8::Local<v8::Value> v8Value(v8::Local<v8::Value>::New(isolate, value)); |
| 661 uint32_t length = 0; | 661 uint32_t length = 0; |
| 662 if (value->IsArray()) { | 662 if (value->IsArray()) { |
| 663 length = v8::Local<v8::Array>::Cast(v8Value)->Length(); | 663 length = v8::Local<v8::Array>::Cast(v8Value)->Length(); |
| 664 } else if (toV8Sequence(value, length, isolate).IsEmpty()) { | 664 } else if (toV8Sequence(value, length, isolate).IsEmpty()) { |
| 665 throwTypeError(ExceptionMessages::notAnArrayTypeArgumentOrValue(argument
Index), isolate); | 665 throwTypeError(ExceptionMessages::notAnArrayTypeArgumentOrValue(argument
Index), isolate); |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 937 RefPtr<ScriptState> m_scriptState; | 937 RefPtr<ScriptState> m_scriptState; |
| 938 }; | 938 }; |
| 939 | 939 |
| 940 void GetDevToolsFunctionInfo(v8::Handle<v8::Function>, v8::Isolate*, int& script
Id, String& resourceName, int& lineNumber); | 940 void GetDevToolsFunctionInfo(v8::Handle<v8::Function>, v8::Isolate*, int& script
Id, String& resourceName, int& lineNumber); |
| 941 PassRefPtr<TraceEvent::ConvertableToTraceFormat> devToolsTraceEventData(Executio
nContext*, v8::Handle<v8::Function>, v8::Isolate*); | 941 PassRefPtr<TraceEvent::ConvertableToTraceFormat> devToolsTraceEventData(Executio
nContext*, v8::Handle<v8::Function>, v8::Isolate*); |
| 942 | 942 |
| 943 | 943 |
| 944 } // namespace WebCore | 944 } // namespace WebCore |
| 945 | 945 |
| 946 #endif // V8Binding_h | 946 #endif // V8Binding_h |
| OLD | NEW |