Index: Source/bindings/dart/DartUtilities.h |
diff --git a/Source/bindings/dart/DartUtilities.h b/Source/bindings/dart/DartUtilities.h |
index 056c494a808495401e261563a0b7b0f85e2ad1a2..16171d31f66bf942ebd7fac2171c24287f5ee64d 100644 |
--- a/Source/bindings/dart/DartUtilities.h |
+++ b/Source/bindings/dart/DartUtilities.h |
@@ -171,6 +171,9 @@ public: |
static const uint8_t* fullSnapshot(Frame*); |
+ static Dart_Handle canonicalizeUrl(Dart_Handle library, Dart_Handle urlHandle, String url); |
+ |
+ static void reportProblem(ScriptExecutionContext*, const String&); |
static void reportProblem(ScriptExecutionContext*, Dart_Handle); |
static void reportProblem(ScriptExecutionContext*, Dart_Handle, const String& sourceURL); |
@@ -194,6 +197,13 @@ public: |
static Dart_Handle invokeUtilsMethod(const char* methodName, int argCount, Dart_Handle* args); |
+ static Dart_Handle convertSourceString(const String& source) |
+ { |
+ // FIXME: Decide whether to externalize this here. |
+ const CString utf8encoded = source.utf8(); |
+ return Dart_NewStringFromCString(utf8encoded.data()); |
+ } |
+ |
static DartStringAdapter dartToString(Dart_Handle object, Dart_Handle& exception) |
{ |
// FIXME: [performance] need better treatment of String vs. AtomicString, cf. v8 implementation. |