Closed
Bug 313149
Opened 19 years ago
Closed 19 years ago
the code of findBar.js should be protected in a prototype
Categories
(Toolkit :: Find Toolbar, enhancement, P1)
Tracking
()
RESOLVED
FIXED
mozilla1.8.1alpha3
People
(Reporter: masayuki, Assigned: masayuki)
References
Details
(Keywords: fixed1.8.1)
Attachments
(4 files, 3 obsolete files)
54.92 KB,
patch
|
Details | Diff | Splinter Review | |
71.32 KB,
patch
|
mconnor
:
review+
|
Details | Diff | Splinter Review |
57.48 KB,
patch
|
Details | Diff | Splinter Review | |
74.02 KB,
patch
|
mconnor
:
approval-branch-1.8.1+
|
Details | Diff | Splinter Review |
Currently, Firefox's FastFind/FAYT's codes are included by some files. But the functions and variables are defined on global. This is not safety. We should protect these functions and variables with prototype. # See bug 312913.
Assignee | ||
Comment 1•19 years ago
|
||
Everyone: I'm working on this. Please don't allow to check-in to findBar.js on Trunk for several days.
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•19 years ago
|
||
Attachment #201440 -
Flags: review?(mconnor)
Assignee | ||
Comment 3•19 years ago
|
||
Assignee | ||
Comment 4•19 years ago
|
||
NOTE: I didn't change any logic. I only wrapped all variables and functions with gFindBar prototype.
Assignee | ||
Updated•19 years ago
|
Priority: -- → P1
Target Milestone: --- → Firefox1.6-
Comment 5•19 years ago
|
||
Comment on attachment 201441 [details] [diff] [review] Patch rv1.0(-u8pw) prevailing style uses this.foo() instead of gFindBar.foo() where possible. Anyway, this is good cleanup overall for trunk (and possibly Fx2)
Assignee | ||
Comment 6•19 years ago
|
||
(In reply to comment #5) > (From update of attachment 201441 [details] [diff] [review] [edit]) > prevailing style uses this.foo() instead of gFindBar.foo() where possible. > > Anyway, this is good cleanup overall for trunk (and possibly Fx2) > Mike: See my comment in the patch. If we use this.foo(), when the method is called by timers or event listeners, |this| keyword doesn't refer to |gFindBar|. Then this.foo() is broken. I link this.foo(). But if I rewrite so, the patch doesn't work fine :-(
Assignee | ||
Comment 7•19 years ago
|
||
I provide another way that is using this.foo() style. But in this patch, we need global functions for event handlers and for timer handlers. However, these name always have "findBar_" prefix.
Attachment #201510 -
Flags: review?(mconnor)
Assignee | ||
Comment 8•19 years ago
|
||
Assignee | ||
Comment 9•19 years ago
|
||
Mike: Please choose from these patches. rv1.0 uses gFindBar.foo() style, But it doesn't have global functions. rv2.0 uses this.foo() style, But it has global functions that is having "findBar_" prefix in its name.
Assignee | ||
Updated•19 years ago
|
Attachment #201510 -
Flags: review?(mconnor) → review-
Assignee | ||
Comment 10•19 years ago
|
||
We need more changing for browser.js. If you grant to rv1.0, I will change it too.
Attachment #201510 -
Attachment is obsolete: true
Attachment #201518 -
Flags: review?(mconnor)
Assignee | ||
Comment 11•19 years ago
|
||
Attachment #201511 -
Attachment is obsolete: true
Comment 12•19 years ago
|
||
Comment on attachment 201518 [details] [diff] [review] Patch rv2.1 I like this approach better, thanks!
Attachment #201518 -
Flags: review?(mconnor) → review+
Assignee | ||
Comment 13•19 years ago
|
||
checked-in to Trunk. Thanks. NOTE: This patch is very big. So, it may have regression. But don't reopen this bug. Please file a new bug and adding to CC me.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Whiteboard: Don't reopen this. Please file a new bug for this regression.
Assignee | ||
Updated•19 years ago
|
Whiteboard: Don't reopen this. Please file a new bug for this regression. → Don't reopen this. Please file a new bug for regressions.
Assignee | ||
Updated•19 years ago
|
Attachment #201440 -
Attachment is obsolete: true
Attachment #201440 -
Flags: review?(mconnor)
Updated•19 years ago
|
Comment 14•18 years ago
|
||
This patch is suitable for the branch, right? All found regressions have been fixed, from what I can tell? Masayuki, since the branch and trunk are going to be synced, it would be great if you could ask for approval and land this on the 1.8 branch as well (with the patches from bug 314986 and bug 328036).
Assignee | ||
Comment 15•18 years ago
|
||
(In reply to comment #14) > This patch is suitable for the branch, right? All found regressions have been > fixed, from what I can tell? Masayuki, since the branch and trunk are going to > be synced, it would be great if you could ask for approval and land this on the > 1.8 branch as well (with the patches from bug 314986 and bug 328036). > We need to work for checking-in to 1.8 branch. Because 1.8's code is changed by Places... http://bonsai.mozilla.org/cvslog.cgi?file=mozilla/toolkit/components/typeaheadfind/content/findBar.js&rev=HEAD&mark=1.35 http://bonsai.mozilla.org/cvslog.cgi?file=mozilla/toolkit/components/typeaheadfind/content/findBar.js&rev=MOZILLA_1_8_BRANCH&mark=1.21.2.11
Comment 16•18 years ago
|
||
(In reply to comment #15) > We need to work for checking-in to 1.8 branch. Because 1.8's code is changed > by Places... How hard would it be to do this merging? If you don't have enough time to do it, let me know and I will.
Assignee | ||
Comment 17•18 years ago
|
||
If we also fix bug 313653 and bug 321481 they are fixed on trunk after this, it is easy work. I don't have much time. If you can work on this, please do it.
Comment 18•18 years ago
|
||
Rollup with fixes from bug 313653, bug 314986, bug 321481, and bug 328036.
Attachment #220272 -
Flags: approval-branch-1.8.1?(mconnor)
Comment 19•18 years ago
|
||
Comment on attachment 220272 [details] [diff] [review] Branch rollup Phil, can you point pkasting to this bug, since he's doing other things here.
Attachment #220272 -
Flags: approval-branch-1.8.1?(mconnor) → approval-branch-1.8.1+
Updated•18 years ago
|
Whiteboard: Don't reopen this. Please file a new bug for regressions. → [checkin needed (1.8 branch)]
Assignee | ||
Updated•18 years ago
|
Whiteboard: [checkin needed (1.8 branch)] → [checkin needed (1.8 branch)] (pending, 1.8 branch is closed)
Comment 20•18 years ago
|
||
Attachment 220272 [details] [diff] checked in on the 1.8 branch.
Keywords: fixed1.8.1
Whiteboard: [checkin needed (1.8 branch)] (pending, 1.8 branch is closed)
Target Milestone: Firefox 2 → Firefox 2 alpha3
Version: Trunk → 2.0 Branch
Comment 21•18 years ago
|
||
Hmm could this fix have broken Thunderbird's findbar on the 1.8.1 branch? See Bug 338185
Updated•16 years ago
|
Product: Firefox → Toolkit
You need to log in
before you can comment on or make changes to this bug.
Description
•