Bug 1069694 - Remove JS_GetScriptSourceMap. r=shu
authorTom Schuster <evilpies@gmail.com>
Sat, 04 Oct 2014 17:38:08 +0200
changeset 232043 fa8375efaefcbba76647dbf35f771055ad0749c3
parent 232042 85dc7c0f9f7105a2e6f5501da08568c72cb6663e
child 232044 759811d71d329a026b60ee7f52f2c72d7db266cf
push id4187
push userbhearsum@mozilla.com
push dateFri, 28 Nov 2014 15:29:12 +0000
treeherdermozilla-beta@f23cc6a30c11 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersshu
bugs1069694
milestone35.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1069694 - Remove JS_GetScriptSourceMap. r=shu
js/public/OldDebugAPI.h
js/src/jsapi-tests/testScriptInfo.cpp
js/src/vm/OldDebugAPI.cpp
--- a/js/public/OldDebugAPI.h
+++ b/js/public/OldDebugAPI.h
@@ -32,15 +32,12 @@ typedef enum JSTrapStatus {
 extern JS_PUBLIC_API(JSScript *)
 JS_GetFunctionScript(JSContext *cx, JS::HandleFunction fun);
 
 /************************************************************************/
 
 extern JS_PUBLIC_API(const char *)
 JS_GetScriptFilename(JSScript *script);
 
-extern JS_PUBLIC_API(const char16_t *)
-JS_GetScriptSourceMap(JSContext *cx, JSScript *script);
-
 extern JS_PUBLIC_API(unsigned)
 JS_GetScriptBaseLineNumber(JSContext *cx, JSScript *script);
 
 #endif /* js_OldDebugAPI_h */
--- a/js/src/jsapi-tests/testScriptInfo.cpp
+++ b/js/src/jsapi-tests/testScriptInfo.cpp
@@ -29,19 +29,16 @@ BEGIN_TEST(testScriptInfo)
     JS::CompileOptions options(cx);
     options.setFileAndLine(__FILE__, startLine);
     JS::RootedScript script(cx);
     CHECK(JS_CompileScript(cx, global, code, strlen(code), options, &script));
     CHECK(script);
 
     CHECK_EQUAL(JS_GetScriptBaseLineNumber(cx, script), startLine);
     CHECK(strcmp(JS_GetScriptFilename(script), __FILE__) == 0);
-    const char16_t *sourceMap = JS_GetScriptSourceMap(cx, script);
-    CHECK(sourceMap);
-    CHECK(CharsMatch(sourceMap, "http://example.com/path/to/source-map.json"));
 
     return true;
 }
 static bool
 CharsMatch(const char16_t *p, const char *q)
 {
     while (*q) {
         if (*p++ != *q++)
--- a/js/src/vm/OldDebugAPI.cpp
+++ b/js/src/vm/OldDebugAPI.cpp
@@ -60,21 +60,13 @@ JS_PUBLIC_API(const char *)
 JS_GetScriptFilename(JSScript *script)
 {
     // This is called from ThreadStackHelper which can be called from another
     // thread or inside a signal hander, so we need to be careful in case a
     // copmacting GC is currently moving things around.
     return script->maybeForwardedFilename();
 }
 
-JS_PUBLIC_API(const char16_t *)
-JS_GetScriptSourceMap(JSContext *cx, JSScript *script)
-{
-    ScriptSource *source = script->scriptSource();
-    MOZ_ASSERT(source);
-    return source->hasSourceMapURL() ? source->sourceMapURL() : nullptr;
-}
-
 JS_PUBLIC_API(unsigned)
 JS_GetScriptBaseLineNumber(JSContext *cx, JSScript *script)
 {
     return script->lineno();
 }