Chromium Code Reviews| Index: Source/bindings/dart/DartApplicationLoader.cpp |
| diff --git a/Source/bindings/dart/DartApplicationLoader.cpp b/Source/bindings/dart/DartApplicationLoader.cpp |
| index 7f8ef4ccba352ad945b132cc9479bb035eb2cc31..6cb73492180b0bac2afa9c414d310988d9716458 100644 |
| --- a/Source/bindings/dart/DartApplicationLoader.cpp |
| +++ b/Source/bindings/dart/DartApplicationLoader.cpp |
| @@ -180,8 +180,13 @@ void DartApplicationLoader::loadMainScript(const String& url, const String& sour |
| } |
| ASSERT(!Dart_IsNull(script)); |
| - // FIXME(dartbug.com/13460): We need to record the lineOffset and columnOffset. |
| - Dart_Handle library = Dart_LoadLibrary(DartUtilities::stringToDartString(url), dartSource); |
| + Dart_Handle libraryUrlHandle = DartUtilities::stringToDartString(url); |
| + // Test if a previous script already loaded this library. |
| + Dart_Handle library = Dart_LookupLibrary(libraryUrlHandle); |
| + if (Dart_IsError(library)) { |
| + // FIXME(dartbug.com/13460): We need to record the lineOffset and columnOffset. |
| + library = Dart_LoadLibrary(libraryUrlHandle, dartSource); |
| + } |
| if (Dart_IsError(library)) |
| DartUtilities::reportProblem(m_originDocument, library, m_libraryUrl); |
|
siva
2013/10/28 19:52:42
This Dart_IsError(library) error check should also
vsm
2013/10/28 19:58:41
Done.
|