Project

General

Profile

Defect #551

plugins.WebClientUtils.generateCallbackScript(...) mixes up the method to call when generating callback scripts for 2 similar named methods in different toplevel scopes

Added by P Bakker over 11 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
High
Assignee:
-
Start date:
09/17/2012
Due date:
% Done:

0%

Estimated time:
Browser (if web client):

Description

if you define 2 methods named "callback" in 2 different scopes (scopes.x and scopes.y) and generate the callbackScripts for them, one of the two always methods always gets called, regardless of the callbackscript used.

I think this is due to the checks made in addCallback in BehaviorProvider: it tries to reuse callbackscripts if you try generating callbackScripts for the same method multiple times, but the checks only take into account formName and methodsName, not scopeName. since the formName doesn't exists (it's a toplevel scope method) and the names of the methods are equal, the code reuses the first callbackscript that was generated.


Files

web_client_utils.jar (24 KB) web_client_utils.jar patched plugin jar Patrick Talbot, 09/17/2012 10:17 PM

History

#1

Updated by Patrick Talbot over 11 years ago

I've set the key to the callbacks Map to be the Function hashCode instead of the functionDefinition and test on that key, it should better assess the identity of the initial Function than the FunctionDefinition's hash and content.
Could you try the attached patched plugin and tell me if this solves the issue?
Thanks!

#2

Updated by Patrick Talbot over 11 years ago

  • Status changed from New to Closed

Fixed in v1.3.4

Also available in: Atom PDF