зеркало из https://github.com/mozilla/gecko-dev.git
Fix bug # 17385: calling ServiceManager::GetService() can fail for windows that aren't local due to security, so wrap the call inside of a "try" block.
This commit is contained in:
Родитель
277a68344f
Коммит
bc9e4c4d31
|
@ -460,11 +460,11 @@ function UpdateBookmarksLastVisitedDate(event)
|
|||
|
||||
if (window.content.location.href && window.content.location.href != "")
|
||||
{
|
||||
// if the URL is bookmarked, update its "Last Visited" date
|
||||
var bmks = Components.classes["component://netscape/browser/bookmarks-service"].getService();
|
||||
if (bmks) bmks = bmks.QueryInterface(Components.interfaces.nsIBookmarksService);
|
||||
try
|
||||
{
|
||||
// if the URL is bookmarked, update its "Last Visited" date
|
||||
var bmks = Components.classes["component://netscape/browser/bookmarks-service"].getService();
|
||||
if (bmks) bmks = bmks.QueryInterface(Components.interfaces.nsIBookmarksService);
|
||||
if (bmks) bmks.UpdateBookmarkLastVisitedDate(window.content.location.href);
|
||||
}
|
||||
catch(ex)
|
||||
|
|
|
@ -460,11 +460,11 @@ function UpdateBookmarksLastVisitedDate(event)
|
|||
|
||||
if (window.content.location.href && window.content.location.href != "")
|
||||
{
|
||||
// if the URL is bookmarked, update its "Last Visited" date
|
||||
var bmks = Components.classes["component://netscape/browser/bookmarks-service"].getService();
|
||||
if (bmks) bmks = bmks.QueryInterface(Components.interfaces.nsIBookmarksService);
|
||||
try
|
||||
{
|
||||
// if the URL is bookmarked, update its "Last Visited" date
|
||||
var bmks = Components.classes["component://netscape/browser/bookmarks-service"].getService();
|
||||
if (bmks) bmks = bmks.QueryInterface(Components.interfaces.nsIBookmarksService);
|
||||
if (bmks) bmks.UpdateBookmarkLastVisitedDate(window.content.location.href);
|
||||
}
|
||||
catch(ex)
|
||||
|
|
Загрузка…
Ссылка в новой задаче