Fix fetching sourcemap in genymotion. Fixes #5338

Summary:Source maps are broken on Genymotion right now as they aren't being loaded from the correct URL. refer - https://github.com/facebook/react-native/issues/5338#issuecomment-188232402

**Test plan**

Build and install UIExplorer from master branch in genymotion and enable hot reload. When you change a file and save it, you'll see a Yellow box due to source map fetching failed, as per the referenced comment.

Doing the same for this branch doesn't produce any yellow boxes.
Closes https://github.com/facebook/react-native/pull/6594

Differential Revision: D3088218

Pulled By: martinbigio

fb-gh-sync-id: 0d1c19cc263de5c6c62061c399eef33fa4ac4a7b
shipit-source-id: 0d1c19cc263de5c6c62061c399eef33fa4ac4a7b
This commit is contained in:
Satyajit Sahoo 2016-03-24 12:05:48 -07:00 committed by Facebook Github Bot 6
parent 4ea783234b
commit 7cf1c7f51f
1 changed files with 3 additions and 3 deletions

View File

@ -170,9 +170,9 @@ class Bundler {
}); });
} }
_sourceHMRURL(platform, host, port, path) { _sourceHMRURL(platform, path) {
return this._hmrURL( return this._hmrURL(
`http://${host}:${port}`, '',
platform, platform,
'bundle', 'bundle',
path, path,
@ -217,7 +217,7 @@ class Bundler {
return this._bundle({ return this._bundle({
...options, ...options,
bundle: new HMRBundle({ bundle: new HMRBundle({
sourceURLFn: this._sourceHMRURL.bind(this, options.platform, host, port), sourceURLFn: this._sourceHMRURL.bind(this, options.platform),
sourceMappingURLFn: this._sourceMappingHMRURL.bind( sourceMappingURLFn: this._sourceMappingHMRURL.bind(
this, this,
options.platform, options.platform,