Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2011, Google Inc. | 1 // Copyright 2011, Google Inc. |
| 2 // All rights reserved. | 2 // All rights reserved. |
| 3 // | 3 // |
| 4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
| 5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
| 6 // met: | 6 // met: |
| 7 // | 7 // |
| 8 // * Redistributions of source code must retain the above copyright | 8 // * Redistributions of source code must retain the above copyright |
| 9 // notice, this list of conditions and the following disclaimer. | 9 // notice, this list of conditions and the following disclaimer. |
| 10 // * Redistributions in binary form must reproduce the above | 10 // * Redistributions in binary form must reproduce the above |
| (...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 468 static PassRefPtr<SerializedScriptValue> dartToSerializedScriptValue(Dart_Ha ndle, Dart_Handle& exception); | 468 static PassRefPtr<SerializedScriptValue> dartToSerializedScriptValue(Dart_Ha ndle, Dart_Handle& exception); |
| 469 static Dart_Handle serializedScriptValueToDart(PassRefPtr<SerializedScriptVa lue>); | 469 static Dart_Handle serializedScriptValueToDart(PassRefPtr<SerializedScriptVa lue>); |
| 470 | 470 |
| 471 static Dart_Handle dateToDart(double); | 471 static Dart_Handle dateToDart(double); |
| 472 static double dartToDate(Dart_Handle, Dart_Handle&); | 472 static double dartToDate(Dart_Handle, Dart_Handle&); |
| 473 static double dartToDate(Dart_NativeArguments args, int idx, Dart_Handle&); | 473 static double dartToDate(Dart_NativeArguments args, int idx, Dart_Handle&); |
| 474 static bool isDateTime(Dart_Handle); | 474 static bool isDateTime(Dart_Handle); |
| 475 static bool isBlob(Dart_Handle); | 475 static bool isBlob(Dart_Handle); |
| 476 static bool isImageData(Dart_Handle); | 476 static bool isImageData(Dart_Handle); |
| 477 static bool isIDBKeyRange(Dart_Handle); | 477 static bool isIDBKeyRange(Dart_Handle); |
| 478 static bool objectIsType(Dart_Handle, const char* libraryName, const char* t ypeName); | |
| 479 static bool isTypeSubclassOf(Dart_Handle type, const char* libraryName, cons t char* typeName); | 478 static bool isTypeSubclassOf(Dart_Handle type, const char* libraryName, cons t char* typeName); |
| 480 | 479 |
| 481 static bool isTypedData(Dart_Handle); | 480 static bool isTypedData(Dart_Handle); |
| 482 | 481 |
| 483 static Dart_Handle arrayBufferToDart(WTF::ArrayBuffer*); | 482 static Dart_Handle arrayBufferToDart(WTF::ArrayBuffer*); |
| 484 static Dart_Handle arrayBufferToDart(PassRefPtr<WTF::ArrayBuffer> value) | 483 static Dart_Handle arrayBufferToDart(PassRefPtr<WTF::ArrayBuffer> value) |
| 485 { | 484 { |
| 486 return arrayBufferToDart(value.get()); | 485 return arrayBufferToDart(value.get()); |
| 487 } | 486 } |
| 488 | 487 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 541 static PassRefPtr<WTF::Int32Array> dartToInt32Array(Dart_NativeArguments arg s, int idx, Dart_Handle& exception); | 540 static PassRefPtr<WTF::Int32Array> dartToInt32Array(Dart_NativeArguments arg s, int idx, Dart_Handle& exception); |
| 542 static PassRefPtr<WTF::Uint8Array> dartToUint8Array(Dart_Handle, Dart_Handle &); | 541 static PassRefPtr<WTF::Uint8Array> dartToUint8Array(Dart_Handle, Dart_Handle &); |
| 543 static PassRefPtr<WTF::Uint8Array> dartToUint8Array(Dart_NativeArguments arg s, int idx, Dart_Handle& exception); | 542 static PassRefPtr<WTF::Uint8Array> dartToUint8Array(Dart_NativeArguments arg s, int idx, Dart_Handle& exception); |
| 544 static PassRefPtr<WTF::Float32Array> dartToFloat32Array(Dart_Handle, Dart_Ha ndle&); | 543 static PassRefPtr<WTF::Float32Array> dartToFloat32Array(Dart_Handle, Dart_Ha ndle&); |
| 545 static PassRefPtr<WTF::Float32Array> dartToFloat32Array(Dart_NativeArguments args, int idx, Dart_Handle& exception); | 544 static PassRefPtr<WTF::Float32Array> dartToFloat32Array(Dart_NativeArguments args, int idx, Dart_Handle& exception); |
| 546 | 545 |
| 547 static v8::Local<v8::Context> currentV8Context(); | 546 static v8::Local<v8::Context> currentV8Context(); |
| 548 | 547 |
| 549 private: | 548 private: |
| 550 static PassRefPtr<StringImpl> toStringImpl(Dart_Handle, intptr_t charsize, i ntptr_t strlength, Dart_Handle& exception); | 549 static PassRefPtr<StringImpl> toStringImpl(Dart_Handle, intptr_t charsize, i ntptr_t strlength, Dart_Handle& exception); |
| 550 static bool objectIsClass(Dart_Handle, Dart_Handle cls); | |
|
siva
2013/09/20 23:18:54
In the dart API we have moved away from using the
| |
| 551 static bool objectIsType(Dart_Handle, const char* libraryName, const char* t ypeName); | |
| 551 }; | 552 }; |
| 552 | 553 |
| 553 class DartIsolateScope { | 554 class DartIsolateScope { |
| 554 public: | 555 public: |
| 555 explicit DartIsolateScope(Dart_Isolate isolate) | 556 explicit DartIsolateScope(Dart_Isolate isolate) |
| 556 { | 557 { |
| 557 m_isolate = isolate; | 558 m_isolate = isolate; |
| 558 m_previousIsolate = Dart_CurrentIsolate(); | 559 m_previousIsolate = Dart_CurrentIsolate(); |
| 559 if (m_previousIsolate != m_isolate) { | 560 if (m_previousIsolate != m_isolate) { |
| 560 if (m_previousIsolate) | 561 if (m_previousIsolate) |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 643 } | 644 } |
| 644 }; | 645 }; |
| 645 | 646 |
| 646 | 647 |
| 647 #define DART_UNIMPLEMENTED_EXCEPTION() DartUtilities::notImplementedException(__ FILE__, __LINE__) | 648 #define DART_UNIMPLEMENTED_EXCEPTION() DartUtilities::notImplementedException(__ FILE__, __LINE__) |
| 648 #define DART_UNIMPLEMENTED() Dart_ThrowException(DART_UNIMPLEMENTED_EXCEPTION()) ; | 649 #define DART_UNIMPLEMENTED() Dart_ThrowException(DART_UNIMPLEMENTED_EXCEPTION()) ; |
| 649 | 650 |
| 650 } // namespace WebCore | 651 } // namespace WebCore |
| 651 | 652 |
| 652 #endif // DartUtilities_h | 653 #endif // DartUtilities_h |
| OLD | NEW |