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

Unified Diff: Source/bindings/dart/DartAsyncLoader.cpp

Issue 437263002: Don't forward invalid line offsets for generated scripts to Dart_Load*. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/dart/DartAsyncLoader.cpp
diff --git a/Source/bindings/dart/DartAsyncLoader.cpp b/Source/bindings/dart/DartAsyncLoader.cpp
index 7f64cd70e494d83f3edff3407fb280c3c2adae27..becb391fc9eba35e7e68caf90b97e9a7e5a27d1f 100644
--- a/Source/bindings/dart/DartAsyncLoader.cpp
+++ b/Source/bindings/dart/DartAsyncLoader.cpp
@@ -203,7 +203,11 @@ void DartAsyncLoader::processRequests(Dart_Isolate isolate, const String& script
// Inline script.
ASSERT(!m_pendingLibraries.contains(url));
m_pendingLibraries.add(url);
- process(script->url(), script->scriptContent(), script->startLineNumber().zeroBasedInt());
+ intptr_t lineOffset = script->startLineNumber().zeroBasedInt();
+ // Blink gives generated script tags an invalid start line.
+ if (lineOffset < 0)
+ lineOffset = 0;
+ process(script->url(), script->scriptContent(), lineOffset);
} else {
// Canonicalize the src attribute url.
String canonical = KURL(script->ownerDocument()->url(), src).string();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698