Advertisement
Guest User

loaduri

a guest
Jul 22nd, 2014
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # HG changeset patch
  2. # Parent 3c088ea38495c209a0847fbd4b2800d6a1c23a4a
  3. # User Vikneshwar <lviknesh@gmail.com>
  4. Bug 1038599 - Called OpenLinkIn from loadURI;r=dao
  5.  
  6. diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js
  7. --- a/browser/base/content/browser.js
  8. +++ b/browser/base/content/browser.js
  9. @@ -1894,25 +1894,20 @@ function BrowserTryToCloseWindow()
  10.    if (WindowIsClosing())
  11.      window.close();     // WindowIsClosing does all the necessary checks
  12.  }
  13.  
  14.  function loadURI(uri, referrer, postData, allowThirdPartyFixup) {
  15.    if (postData === undefined)
  16.      postData = null;
  17.  
  18. -  var flags = nsIWebNavigation.LOAD_FLAGS_NONE;
  19. -  if (allowThirdPartyFixup) {
  20. -    flags |= nsIWebNavigation.LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP;
  21. -    flags |= nsIWebNavigation.LOAD_FLAGS_FIXUP_SCHEME_TYPOS;
  22. -  }
  23. -
  24. -  try {
  25. -    gBrowser.loadURIWithFlags(uri, flags, referrer, null, postData);
  26. -  } catch (e) {}
  27. +  openLinkIn(uri, "current",
  28. +             { referrerURI: referrer,
  29. +               postData: postData,
  30. +               allowThirdPartyFixup: allowThirdPartyFixup });
  31.  }
  32.  
  33.  function getShortcutOrURIAndPostData(aURL, aCallback) {
  34.    let mayInheritPrincipal = false;
  35.    let postData = null;
  36.    let shortcutURL = null;
  37.    let keyword = aURL;
  38.    let param = "";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement