Opened 14 months ago

Closed 14 months ago

Last modified 14 months ago

#4331 closed defect (fixed)

Wrapped WebSocket has wrong constructor signature

Reported by: trev Assignee: kzar
Priority: P1 Milestone: Adblock-Plus-1.12.2-for-Chrome-Opera-Safari
Module: Platform Keywords:
Cc: sebastian, kzar, Ross, scheer Blocked By:
Blocking: #1727 Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Scheer Verified working: yes
Review URL(s):

https://codereview.adblockplus.org/29349816/

Description

Environment

Adblock Plus 1.12.1.1640 on Chrome 52.

How to reproduce

  1. Go to https://google.com/
  2. Press Ctrl-Shift-J/Cmd-Option-J to open JavaScript console.
  3. Type WebSocket.length and press Enter.

Observed behaviour

You see 2 being printed to console.

Expected behaviour

It should be 1, as you get on the new tab page where WebSocket isn't wrapped.

Our wrapper should only have one parameter, the second parameter should be accessed as arguments[1] rather than by name.

Change History (6)

comment:1 Changed 14 months ago by kzar

  • Owner set to kzar
  • Priority changed from Unknown to P1
  • Ready set
  • Review URL(s) modified (diff)

comment:2 Changed 14 months ago by kzar

  • Status changed from new to reviewing

comment:3 Changed 14 months ago by abpbot

A commit referencing this issue has landed:
Fixes 4331, 4332 - WebSocket.length and instanceof WebSocket

comment:4 Changed 14 months ago by kzar

  • Cc Ross scheer added
  • Milestone set to Adblock-Plus-1.12.2-for-Chrome-Opera-Safari
  • Resolution set to fixed
  • Status changed from reviewing to closed

comment:5 Changed 14 months ago by scheer

  • Tester changed from Unknown to Scheer
  • Verified working set
  • When entering the above command in the Java console I get the following:
-WebSocket.length
-1

Chrome 52
ABP 1.12.1.1644

comment:6 Changed 14 months ago by rraceanu

Same results for Safari 8/9 and Opera 39.0.2256.48 - ABP 1.21.1.1664

-WebSocket.length
-1

Last edited 14 months ago by rraceanu (previous) (diff)
Note: See TracTickets for help on using tickets.