Opened 4 years ago

Closed 4 years ago

#2877 closed defect (fixed)

Element Hiding Helper causes tab to crash when selecting some elements

Reported by: trev Assignee: trev
Priority: P1 Milestone: Element-Hiding-Helper-1.3.3
Module: Extensions-for-Adblock-Plus Keywords: e10s
Cc: Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

https://codereview.adblockplus.org/29323439/

Description

Environment

Adblock Plus 2.6.10.3969, Element Hiding Helper 1.3.2.497, Firefox 42.0a1 (2015-08-09 nightly), Mac OS X 10.10.

How to reproduce

  1. Go to https://mail.ru/
  2. Click ABP icon and choose "Select an element to hide"
  3. Select one of the news links and press Enter

Observed behaviour

The tab crashes. Crash report shows the following stack trace:

  • mozalloc_abort(char const*)
  • Abort
  • NS_DebugBreak
  • mozilla::ipc::MessageChannel::OnChannelErrorFromLink()

That last stack frame points to http://hg.mozilla.org/mozilla-central/annotate/91de9c670800/ipc/glue/MessageChannel.cpp#l1762 indicating that there was some kind of IPC channel error.

This isn't a regression, old Firefox nightlies crash as well.

Expected behaviour

There should be no crash.

Change History (5)

comment:1 Changed 4 years ago by trev

The problem seems to be the size of the data structure we create for these nodes.

comment:2 Changed 4 years ago by trev

  • Keywords e10s added

comment:3 Changed 4 years ago by trev

In fact, the data structure we create refers to the same nodes multiple times so the stringified size grows exponentially with the number of nodes involved. In this particular case JSON.stringify() returns ~250 MB of data. We shouldn't stringify the data structure at all but let the browser create a structured clone of it.

comment:4 Changed 4 years ago by trev

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:5 Changed 4 years ago by trev

  • Milestone set to Element-Hiding-Helper-1.3.3
  • Resolution set to fixed
  • Status changed from reviewing to closed
Note: See TracTickets for help on using tickets.