Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(316)

Unified Diff: Source/bindings/dart/DartApplicationLoader.h

Issue 26490003: Reapply "Move isolate loading to a separate loader isolate." (Closed) Base URL: svn://svn.chromium.org/multivm/trunk/webkit
Patch Set: Initialize flag properly Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/dart/script-onerror-expected.txt ('k') | Source/bindings/dart/DartApplicationLoader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/dart/DartApplicationLoader.h
diff --git a/Source/bindings/dart/DartApplicationLoader.h b/Source/bindings/dart/DartApplicationLoader.h
index 6c59502f8d0c90ff9a2d3702500d9a0d8a7165d5..a6333d4da313d505701f68fe05125f3267a26bfe 100644
--- a/Source/bindings/dart/DartApplicationLoader.h
+++ b/Source/bindings/dart/DartApplicationLoader.h
@@ -30,6 +30,7 @@
#ifndef DartApplicationLoader_h
#define DartApplicationLoader_h
+#include "bindings/dart/DartAsyncLoader.h"
#include "bindings/v8/ScriptSourceCode.h"
#include "core/html/HTMLScriptElement.h"
#include "core/html/VoidCallback.h"
@@ -50,10 +51,9 @@ public:
virtual void dispatchErrorEvent() = 0;
};
- DartApplicationLoader(Dart_Isolate, Document*, PassRefPtr<ErrorEventDispatcher>, PassRefPtr<VoidCallback> = 0, bool domEnabled = true);
+ DartApplicationLoader(Dart_Isolate, Document*, PassRefPtr<ErrorEventDispatcher>, PassRefPtr<DartAsyncLoader>, bool domEnabled = true);
- void loadScriptResource(const String& url);
- void load(const String& url, const String& source, WTF::OrdinalNumber startLineNumber);
+ void load(const String& url, const String& source, int startLineNumber);
const String& mainLibraryURL() const { return m_libraryUrl; }
Document* document() { return m_originDocument; }
@@ -62,10 +62,9 @@ public:
private:
void scriptLoadError(String failedUrl);
- void loadMainScript(const String& url, const String& source, WTF::OrdinalNumber startLineNumber);
+ void loadMainScript(const String& url, const String& source, int startLineNumber);
static Dart_Handle libraryTagHandlerCallback(Dart_LibraryTag, Dart_Handle library, Dart_Handle urlHandle);
- static Dart_Handle CanonicalizeUrl(Dart_Handle library, Dart_Handle urlHandle, String url);
Dart_Handle libraryTagHandler(Dart_LibraryTag, Dart_Handle library, Dart_Handle urlHandle, String url);
Dart_Isolate m_isolate;
@@ -76,30 +75,16 @@ private:
void loadScriptFromSnapshot(const String& url, const uint8_t* snapshot, intptr_t snapshotSize);
void loadLibrary(const String& url, const String& source);
- void loadSource(const String& url, const String& source);
void callEntryPoint();
Dart_Handle topLevelLibrary();
void reportDartError(Dart_Handle);
- typedef HashSet<String> UrlSet;
- typedef HashMap<String, UrlSet*> UrlMultiMap;
-
- void add(UrlMultiMap&, const String& key, const String& value);
-
- // FIXME: we can get rid of imported libs and sources map.
- UrlSet m_importedLibraries;
- UrlMultiMap m_importersForSource;
-
- bool m_mainScriptHasBeenLoaded;
-
bool m_scriptHasError;
-
- RefPtr<VoidCallback> m_applicationLoadedCallback;
bool m_domEnabled;
- friend class ScriptLoadCallback;
+ RefPtr<DartAsyncLoader> m_asyncLoader;
};
}
« no previous file with comments | « LayoutTests/dart/script-onerror-expected.txt ('k') | Source/bindings/dart/DartApplicationLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698