OpenLayers OpenLayers

Ticket #1480 (closed feature: fixed)

Opened 8 months ago

Last modified 8 months ago

Handler Hover causes exceptions on Firefox/Windows

Reported by: bphilippot Assigned to: elemoine
Priority: blocker Milestone: 2.6 Release
Component: Handler.Hover Version: 2.6 RC1
Keywords: Cc:
State: Complete

Description

When using handler hover on Firefox on Windows, an exception appears :

Exception... "Illegal operation on WrappedNative prototype object" nsresult: "0x8057000c (NS_ERROR_XPC_BAD_OP_ON_WN_PROTO)" location: "JS frame : "

at line 64 of Util.js in OpenLayers.Util.Extend function:

if(source.hasOwnProperty && source.hasOwnProperty('toString'))

You can see the problem at : http://www.openlayers.org/dev/examples/hover-handler.html

Attachments

patch-1480-r6762-A0.diff (2.1 kB) - added by elemoine on 04/02/08 07:18:56.

Change History

04/02/08 04:56:51 changed by bartvde

I can't reproduce this on Windows XP and Firefox 2.0.0.13

I did see a similar error before when using Firefox 2.0.0.6 (from the top of my head).

04/02/08 07:18:56 changed by elemoine

  • attachment patch-1480-r6762-A0.diff added.

04/02/08 07:20:54 changed by elemoine

The attached patch fixes the problem. Tested on FF/Linux, FF/Windows, IE6 and IE7.

04/02/08 07:25:04 changed by crschmidt

  • milestone set to 2.6 Release.

Since we're rolling another RC, worth fixing in 2.6.

Eric, thanks. I can confirm that this is a similar fix to the one that I made for a similar problem (with the click handler).

Can you explain how you reproduced the failure?

04/02/08 07:27:45 changed by crschmidt

  • state set to Commit.

Nevermind. Reproducing this was trivial.

I can confirm that this matches my understanding, and I can also confirm that hte current patch fixes the bug. (God, do I hate how ugly using hasOwnProperty is in practice.)

Eric, please commit. When committing, use "(Pullup #1480)" as your commit message; it will be marked for pullup that way.

04/02/08 07:43:42 changed by elemoine

Confirming that

  • hover-handler.html works on FF2/Linux, FF2/Windows, IE6, IE7, Safara3.0.3/Windows, Opera9.24/Windows.
  • unit tests pass on IE6, IE7, and FF2/Linux

04/02/08 07:53:20 changed by elemoine

  • keywords set to pullup.
  • status changed from new to closed.
  • state changed from Commit to Pullup.
  • resolution set to fixed.

(In [6763]) FF/Windows < 2.0.0.13 reports "Illegal operation on WrappedNative prototype object" when calling hawOwnProperty if the source object is an instance of window.Event. r=crschmidt (closes #1480) (Pullup #1480)

04/02/08 08:52:19 changed by crschmidt

  • keywords deleted.
  • status changed from closed to reopened.
  • resolution deleted.

04/07/08 21:51:04 changed by crschmidt

  • status changed from reopened to closed.
  • state changed from Pullup to Complete.
  • resolution set to fixed.

(In [6819]) Pullup commits from trunk to 2.6 branch:

  • virtualStyle typo (Closes #1495)
  • JSON fix for Safari 3.1 (Closes #1493)
  • panzoombar off-by-one (Closes #1486)
  • Handler Hover exception (Closes #1480)
  • Popup.framedcloud exception (Closes #1479)
  • VML Renderer when including namespace in page (Closes #1477)
  • SLD/Rule/Filter changes -- most of this commit (Closes #1492)