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

Side by Side Diff: Source/bindings/dart/DartAsyncLoader.h

Issue 428783004: Pass line offsets to Dart_LoadLibrary and Dart_LoadSource. (Closed) Base URL: svn://svn.chromium.org/blink/branches/dart/dartium
Patch Set: Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013, Google Inc. 1 // Copyright 2013, 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 void process(const String& url, const String& source, intptr_t lineNumber); 126 void process(const String& url, const String& source, intptr_t lineNumber);
127 void fetchScriptResource(const String& url); 127 void fetchScriptResource(const String& url);
128 128
129 // The main script has been processed. The top-level source and lineNumber a re valid. 129 // The main script has been processed. The top-level source and lineNumber a re valid.
130 bool mainScriptFetched() const { return m_mainScriptFetched; } 130 bool mainScriptFetched() const { return m_mainScriptFetched; }
131 131
132 // All dependences are available. 132 // All dependences are available.
133 bool ready() const { return mainScriptFetched() && m_pendingLibraries.isEmpt y() && m_pendingSource.isEmpty() && !m_error; } 133 bool ready() const { return mainScriptFetched() && m_pendingLibraries.isEmpt y() && m_pendingSource.isEmpty() && !m_error; }
134 134
135 void findDependences(const String& url, const String& source, intptr_t lineN umber); 135 void findDependences(const String& url, const String& source, intptr_t lineN umber);
136 void processLibrary(const String& url, const String& source); 136 void processLibrary(const String& url, const String& source, intptr_t lineNu mber);
137 void processSource(const String& url, const String& source); 137 void processSource(const String& url, const String& source, intptr_t lineNum ber);
138 void reportError(Dart_Handle error, const String& url); 138 void reportError(Dart_Handle error, const String& url);
139 void reportError(const String& error, const String& url); 139 void reportError(const String& error, const String& url);
140 static Dart_Handle libraryTagHandlerCallback(Dart_LibraryTag, Dart_Handle li brary, Dart_Handle urlHandle); 140 static Dart_Handle libraryTagHandlerCallback(Dart_LibraryTag, Dart_Handle li brary, Dart_Handle urlHandle);
141 141
142 RefPtr<LoadCallback> m_loadCallback; 142 RefPtr<LoadCallback> m_loadCallback;
143 143
144 typedef Vector<RefPtr<DartScriptInfo> > ScriptList; 144 typedef Vector<RefPtr<DartScriptInfo> > ScriptList;
145 ScriptList m_scriptsToLoad; 145 ScriptList m_scriptsToLoad;
146 UrlSet m_pendingLibraries; 146 UrlSet m_pendingLibraries;
147 UrlHandleMap m_pendingSource; 147 UrlHandleMap m_pendingSource;
148 bool m_mainScriptFetched; 148 bool m_mainScriptFetched;
149 bool m_rootLoaded; 149 bool m_rootLoaded;
150 KURL m_topUrl; 150 KURL m_topUrl;
151 bool m_error; 151 bool m_error;
152 152
153 // Private isolate for parsing and processing Dart files. 153 // Private isolate for parsing and processing Dart files.
154 Dart_Isolate m_isolate; 154 Dart_Isolate m_isolate;
155 155
156 friend class ScriptLoadedCallback; 156 friend class ScriptLoadedCallback;
157 }; 157 };
158 158
159 } 159 }
160 #endif // DartAsyncLoader_h 160 #endif // DartAsyncLoader_h
OLDNEW
« no previous file with comments | « Source/bindings/dart/DartApplicationLoader.cpp ('k') | Source/bindings/dart/DartAsyncLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698