Skip to content

Instantly share code, notes, and snippets.

@develar
Created November 27, 2015 15:41
Show Gist options
  • Save develar/b8a9f1d61f5c65939871 to your computer and use it in GitHub Desktop.
Save develar/b8a9f1d61f5c65939871 to your computer and use it in GitHub Desktop.
Index: deps/v8/src/debug/mirrors.js
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- deps/v8/src/debug/mirrors.js (revision 3b69060727fcaa20aab443d7183c5e0d9debaef6)
+++ deps/v8/src/debug/mirrors.js (revision )
@@ -77,6 +77,9 @@
}
+var nodejsSuffix = "(?:[\\r\\n]+}\\);?)?";
+var sourceMapRegExp = new RegExp("[\\r\\n]//[@|#][ \\t]sourceMappingURL=[ \\t]*(?:file://)?([^\\r\\n]*)\\s*(?:\\*/\\s*)?" + nodejsSuffix + "$");
+
// Handle id counters.
var next_handle_ = 0;
var next_transient_handle_ = -1;
@@ -2760,6 +2763,12 @@
if (mirror.context()) {
content.context = this.serializeReference(mirror.context());
}
+
+ var result = sourceMapRegExp.exec(mirror.source());
+ if (result && result.length > 1) {
+ content.sourceMapUrl = result[1]
+ }
+
break;
case MirrorType.CONTEXT_TYPE:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment