Opened 16 years ago
Closed 15 years ago
#5089 closed Bug (fixed)
Problems with compressing named anonymous functions
| Reported by: | Wiktor Walc | Owned by: | Garry Yao |
|---|---|---|---|
| Priority: | Normal | Milestone: | CKEditor 3.5.1 |
| Component: | Project : CKPackager | Version: | |
| Keywords: | Cc: |
Description
When compressing the following code:
function a() {
return function b(){};
};
it is changed into:
function a(){return function b(){b=;};;};
note that in the final result there is a javascript error: b=;
Attachments (4)
Change History (9)
Changed 16 years ago by
| Attachment: | 5089.patch added |
|---|
Changed 16 years ago by
| Attachment: | ckpackager.jar added |
|---|
comment:1 Changed 16 years ago by
| Keywords: | Review? added |
|---|---|
| Owner: | set to Wiktor Walc |
comment:2 Changed 15 years ago by
| Milestone: | → CKEditor 3.5.1 |
|---|
Changed 15 years ago by
| Attachment: | 5089_2.patch added |
|---|
comment:3 Changed 15 years ago by
| Owner: | changed from Wiktor Walc to Garry Yao |
|---|
Proposing a simplified patch.
Changed 15 years ago by
| Attachment: | 5089_3.patch added |
|---|
comment:4 Changed 15 years ago by
| Status: | review → review_passed |
|---|
Using function type looks smart. Please check the third patch I have uploaded - it works in the same way (at least I hope so). I'd prefer using there constants instead of numbers (FUNCTION_EXPRESSION vs 2, we don't need to keep the CKPackager code as short as possible) + I made one conditional statement simpler around L377.
So R+ from me for the second patch, if the third one looks good to you, go ahead ad commit it.
comment:5 Changed 15 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | review_passed → closed |
Fixed with [6330:6331].

It was causing problems in CKFinder and it may be a matter of time when we experience this bug in CKEditor.