[tor-bugs] #14893 [Tor Browser]: GTK errors due to use of deprecated -moz styles in about:tor and elsewhere?

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Feb 13 12:14:35 UTC 2015


#14893: GTK errors due to use of deprecated -moz styles in about:tor and elsewhere?
-----------------------------+----------------------------------
     Reporter:  mikeperry    |      Owner:  tbb-team
         Type:  defect       |     Status:  new
     Priority:  normal       |  Milestone:
    Component:  Tor Browser  |    Version:
   Resolution:               |   Keywords:  TorBrowserTeam201502
Actual Points:               |  Parent ID:
       Points:               |
-----------------------------+----------------------------------

Comment (by cypherpunks):

 Possible workaround for one of those asserts:
 {{{
    torbutton_log(3, "New Identity: Disabling JS");
    torbutton_disable_all_js();

 +  /* This workaround for gtk when browser tries to pass NULL
 +   * and triggering assert error:
 +   * Gtk-CRITICAL **: IA__gtk_clipboard_set_with_data: assertion 'targets
 != NULL' failed
 +   *
 +   * XXX: https://bugzilla.mozilla.org/show_bug.cgi?id=815952 for make it
 +   *      configurable for next after ESR-31 */
 +  try {
 +      var nsIClipboard =
 Components.classes["@mozilla.org/widget/clipboard;1"].
 +
 getService(Components.interfaces.nsIClipboard);
 +
 +      /* Clear clipboard by empty string if previous data was stored in
 private mode */
 +      if (nsIClipboard.hasDataMatchingFlavors(["application/x-moz-
 private-browsing"],
 +                                              1,
 nsIClipboard.kGlobalClipboard)) {
 +        var clipboard =
 Components.classes["@mozilla.org/widget/clipboardhelper;1"].
 +
 getService(Components.interfaces.nsIClipboardHelper);
 +        clipboard.copyString("");
 +      }
 +  } catch(e) {
 +      torbutton_log(3, "Exception on clipboard secure clear: "+e);
 +  }
 +
    m_tb_prefs.setBoolPref("browser.zoom.siteSpecific",
 !m_tb_prefs.getBoolPref("browser.zoom.siteSpecific"));
    m_tb_prefs.setBoolPref("browser.zoom.siteSpecific",
 }}}

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/14893#comment:2>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list