You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Wade Simmons (JIRA)" <ji...@apache.org> on 2011/01/21 21:43:45 UTC

[jira] Created: (THRIFT-1044) Fix JavaScript inheritance

Fix JavaScript inheritance
--------------------------

                 Key: THRIFT-1044
                 URL: https://issues.apache.org/jira/browse/THRIFT-1044
             Project: Thrift
          Issue Type: Bug
          Components: JavaScript - Compiler, JavaScript - Library
    Affects Versions: 0.6
            Reporter: Wade Simmons


The current JavaScript compiler has a pretty simple way of doing inheritance (just copies the prototype fields over). Node.js has a helper method for this (sys.inherits) and there are easier ways to do it in the browser too. This patch makes it easy for the browser and Node.js to each do the right thing.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (THRIFT-1044) Fix JavaScript inheritance

Posted by "Roger Meier (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1044?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12995477#comment-12995477 ] 

Roger Meier commented on THRIFT-1044:
-------------------------------------

Thanks Henrique! Just committed your patch.

> Fix JavaScript inheritance
> --------------------------
>
>                 Key: THRIFT-1044
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1044
>             Project: Thrift
>          Issue Type: Bug
>          Components: JavaScript - Compiler, JavaScript - Library
>    Affects Versions: 0.6
>            Reporter: Wade Simmons
>            Assignee: Roger Meier
>         Attachments: Fix-JavaScript-inheritance.patch, THRIFT-1044-fix-thrift-js-obj.patch
>
>
> The current JavaScript compiler has a pretty simple way of doing inheritance (just copies the prototype fields over). Node.js has a helper method for this (sys.inherits) and there are easier ways to do it in the browser too. This patch makes it easy for the browser and Node.js to each do the right thing.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (THRIFT-1044) Fix JavaScript inheritance

Posted by "Wade Simmons (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1044?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12995413#comment-12995413 ] 

Wade Simmons commented on THRIFT-1044:
--------------------------------------

This patch looks fine to me. I'm curious why this was not working in IE8 or Firefox 3.6 though.

> Fix JavaScript inheritance
> --------------------------
>
>                 Key: THRIFT-1044
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1044
>             Project: Thrift
>          Issue Type: Bug
>          Components: JavaScript - Compiler, JavaScript - Library
>    Affects Versions: 0.6
>            Reporter: Wade Simmons
>            Assignee: Roger Meier
>         Attachments: Fix-JavaScript-inheritance.patch, THRIFT-1044-fix-thrift-js-obj.patch
>
>
> The current JavaScript compiler has a pretty simple way of doing inheritance (just copies the prototype fields over). Node.js has a helper method for this (sys.inherits) and there are easier ways to do it in the browser too. This patch makes it easy for the browser and Node.js to each do the right thing.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (THRIFT-1044) Fix JavaScript inheritance

Posted by "Roger Meier (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-1044?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Roger Meier reassigned THRIFT-1044:
-----------------------------------

    Assignee: Roger Meier

> Fix JavaScript inheritance
> --------------------------
>
>                 Key: THRIFT-1044
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1044
>             Project: Thrift
>          Issue Type: Bug
>          Components: JavaScript - Compiler, JavaScript - Library
>    Affects Versions: 0.6
>            Reporter: Wade Simmons
>            Assignee: Roger Meier
>         Attachments: Fix-JavaScript-inheritance.patch
>
>
> The current JavaScript compiler has a pretty simple way of doing inheritance (just copies the prototype fields over). Node.js has a helper method for this (sys.inherits) and there are easier ways to do it in the browser too. This patch makes it easy for the browser and Node.js to each do the right thing.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (THRIFT-1044) Fix JavaScript inheritance

Posted by "Henrique Mendonca (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-1044?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Henrique Mendonca updated THRIFT-1044:
--------------------------------------

    Attachment: THRIFT-1044-fix-thrift-js-obj.patch

THRIFT-1044-fix-thrift-js-obj.patch
js fix for IE8 and Firefox 3.6

> Fix JavaScript inheritance
> --------------------------
>
>                 Key: THRIFT-1044
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1044
>             Project: Thrift
>          Issue Type: Bug
>          Components: JavaScript - Compiler, JavaScript - Library
>    Affects Versions: 0.6
>            Reporter: Wade Simmons
>            Assignee: Roger Meier
>         Attachments: Fix-JavaScript-inheritance.patch, THRIFT-1044-fix-thrift-js-obj.patch
>
>
> The current JavaScript compiler has a pretty simple way of doing inheritance (just copies the prototype fields over). Node.js has a helper method for this (sys.inherits) and there are easier ways to do it in the browser too. This patch makes it easy for the browser and Node.js to each do the right thing.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (THRIFT-1044) Fix JavaScript inheritance

Posted by "Roger Meier (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-1044?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Roger Meier resolved THRIFT-1044.
---------------------------------

    Resolution: Fixed

committed

> Fix JavaScript inheritance
> --------------------------
>
>                 Key: THRIFT-1044
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1044
>             Project: Thrift
>          Issue Type: Bug
>          Components: JavaScript - Compiler, JavaScript - Library
>    Affects Versions: 0.6
>            Reporter: Wade Simmons
>            Assignee: Roger Meier
>         Attachments: Fix-JavaScript-inheritance.patch
>
>
> The current JavaScript compiler has a pretty simple way of doing inheritance (just copies the prototype fields over). Node.js has a helper method for this (sys.inherits) and there are easier ways to do it in the browser too. This patch makes it easy for the browser and Node.js to each do the right thing.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (THRIFT-1044) Fix JavaScript inheritance

Posted by "Wade Simmons (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-1044?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Wade Simmons updated THRIFT-1044:
---------------------------------

    Attachment: Fix-JavaScript-inheritance.patch

Fix JavaScript inheritance.

For Node.js we can use sys.inherits. For browsers, we use Crockford's inheritance: http://javascript.crockford.com/prototypal.html

> Fix JavaScript inheritance
> --------------------------
>
>                 Key: THRIFT-1044
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1044
>             Project: Thrift
>          Issue Type: Bug
>          Components: JavaScript - Compiler, JavaScript - Library
>    Affects Versions: 0.6
>            Reporter: Wade Simmons
>         Attachments: Fix-JavaScript-inheritance.patch
>
>
> The current JavaScript compiler has a pretty simple way of doing inheritance (just copies the prototype fields over). Node.js has a helper method for this (sys.inherits) and there are easier ways to do it in the browser too. This patch makes it easy for the browser and Node.js to each do the right thing.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.