Cleanup usaages of asar: protocol

This commit is contained in:
Cheng Zhao 2015-01-31 18:50:26 -08:00
parent 37d278de34
commit 23b5c1f782
3 changed files with 4 additions and 4 deletions

View file

@ -179,7 +179,7 @@ class PreloadAttribute extends WebViewAttribute
return '' unless @webViewImpl.webviewNode.hasAttribute @name
preload = resolveUrl @webViewImpl.webviewNode.getAttribute(@name)
protocol = preload.substr 0, 5
unless protocol in ['file:', 'asar:']
unless protocol is 'file:'
console.error webViewConstants.ERROR_MSG_INVALID_PRELOAD_ATTRIBUTE
preload = ''
preload

View file

@ -23,4 +23,4 @@ module.exports =
ERROR_MSG_CANNOT_INJECT_SCRIPT: '<webview>: ' +
'Script cannot be injected into content until the page has loaded.'
ERROR_MSG_INVALID_PARTITION_ATTRIBUTE: 'Invalid partition attribute.'
ERROR_MSG_INVALID_PRELOAD_ATTRIBUTE: 'Only "file:" or "asar:" protocol is supported in "preload" attribute.'
ERROR_MSG_INVALID_PRELOAD_ATTRIBUTE: 'Only "file:" protocol is supported in "preload" attribute.'