| 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 } | 151 } |
| 152 | 152 |
| 153 static Dictionary dartToDictionary(Dart_Handle, Dart_Handle& exception); | 153 static Dictionary dartToDictionary(Dart_Handle, Dart_Handle& exception); |
| 154 static Dictionary dartToDictionaryWithNullCheck(Dart_Handle, Dart_Handle& ex
ception); | 154 static Dictionary dartToDictionaryWithNullCheck(Dart_Handle, Dart_Handle& ex
ception); |
| 155 static Dictionary dartToDictionary(Dart_NativeArguments args, int idx, Dart_
Handle& exception); | 155 static Dictionary dartToDictionary(Dart_NativeArguments args, int idx, Dart_
Handle& exception); |
| 156 static Dictionary dartToDictionaryWithNullCheck(Dart_NativeArguments args, i
nt idx, Dart_Handle& exception); | 156 static Dictionary dartToDictionaryWithNullCheck(Dart_NativeArguments args, i
nt idx, Dart_Handle& exception); |
| 157 | 157 |
| 158 static DOMWindow* domWindowForCurrentIsolate(); | 158 static DOMWindow* domWindowForCurrentIsolate(); |
| 159 | 159 |
| 160 static ScriptExecutionContext* scriptExecutionContext(); | 160 static ScriptExecutionContext* scriptExecutionContext(); |
| 161 static DartScriptState* currentScriptState(); |
| 161 | 162 |
| 162 static bool processingUserGesture(); | 163 static bool processingUserGesture(); |
| 163 | 164 |
| 164 static PassRefPtr<ScriptArguments> createScriptArguments(Dart_Handle argumen
t, Dart_Handle& exception); | 165 static PassRefPtr<ScriptArguments> createScriptArguments(Dart_Handle argumen
t, Dart_Handle& exception); |
| 165 | 166 |
| 166 static PassRefPtr<ScriptCallStack> createScriptCallStack(); | 167 static PassRefPtr<ScriptCallStack> createScriptCallStack(); |
| 167 | 168 |
| 168 static Dart_WeakPersistentHandle createPrologueWeakPersistentHandle(Dart_Han
dle, void* peer, Dart_WeakPersistentHandleFinalizer); | 169 static Dart_WeakPersistentHandle createPrologueWeakPersistentHandle(Dart_Han
dle, void* peer, Dart_WeakPersistentHandleFinalizer); |
| 169 | 170 |
| 170 static void disposeWeakPersistentHandles(); | 171 static void disposeWeakPersistentHandles(); |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 } | 441 } |
| 441 return value; | 442 return value; |
| 442 } | 443 } |
| 443 static Dart_Handle doubleToDart(double value) | 444 static Dart_Handle doubleToDart(double value) |
| 444 { | 445 { |
| 445 return Dart_NewDouble(value); | 446 return Dart_NewDouble(value); |
| 446 } | 447 } |
| 447 | 448 |
| 448 static Dart_Handle numberToDart(double value); | 449 static Dart_Handle numberToDart(double value); |
| 449 | 450 |
| 451 static intptr_t libraryHandleToLibraryId(Dart_Handle library); |
| 452 |
| 450 static ScriptValue dartToScriptValue(Dart_Handle, Dart_Handle& exception); | 453 static ScriptValue dartToScriptValue(Dart_Handle, Dart_Handle& exception); |
| 451 static ScriptValue dartToScriptValue(Dart_NativeArguments args, int index, D
art_Handle& exception) | 454 static ScriptValue dartToScriptValue(Dart_NativeArguments args, int index, D
art_Handle& exception) |
| 452 { | 455 { |
| 453 Dart_Handle object = Dart_GetNativeArgument(args, index); | 456 Dart_Handle object = Dart_GetNativeArgument(args, index); |
| 454 return dartToScriptValue(object, exception); | 457 return dartToScriptValue(object, exception); |
| 455 } | 458 } |
| 456 // NOTE: consider revisiting this once situation w/ optional arguments check
s | 459 // NOTE: consider revisiting this once situation w/ optional arguments check
s |
| 457 // in dart:html is clearer. | 460 // in dart:html is clearer. |
| 458 // The implementation below will convert null to undefined script value. Whi
ch | 461 // The implementation below will convert null to undefined script value. Whi
ch |
| 459 // is exactly what is desired if actual value wasn't specified at call site, | 462 // is exactly what is desired if actual value wasn't specified at call site, |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 636 } | 639 } |
| 637 }; | 640 }; |
| 638 | 641 |
| 639 | 642 |
| 640 #define DART_UNIMPLEMENTED_EXCEPTION() DartUtilities::notImplementedException(__
FILE__, __LINE__) | 643 #define DART_UNIMPLEMENTED_EXCEPTION() DartUtilities::notImplementedException(__
FILE__, __LINE__) |
| 641 #define DART_UNIMPLEMENTED() Dart_ThrowException(DART_UNIMPLEMENTED_EXCEPTION())
; | 644 #define DART_UNIMPLEMENTED() Dart_ThrowException(DART_UNIMPLEMENTED_EXCEPTION())
; |
| 642 | 645 |
| 643 } // namespace WebCore | 646 } // namespace WebCore |
| 644 | 647 |
| 645 #endif // DartUtilities_h | 648 #endif // DartUtilities_h |
| OLD | NEW |