W3C home > Mailing lists > Public > public-script-coord@w3.org > January to March 2013

[Bug 20836] New: What happens when a dictionary references itself?

From: <bugzilla@jessica.w3.org>
Date: Thu, 31 Jan 2013 10:54:36 +0000
To: public-script-coord@w3.org
Message-ID: <bug-20836-3890@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=20836

            Bug ID: 20836
           Summary: What happens when a dictionary references itself?
    Classification: Unclassified
           Product: WebAppsWG
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: WebIDL
          Assignee: cam@mcc.id.au
          Reporter: francois.remy.dev@outlook.com
        QA Contact: public-webapps-bugzilla@w3.org
                CC: mike@w3.org, public-script-coord@w3.org

Let's imagine the following dictionary:
[[
    dictionary LinkedList {
        any value;
        LinkedList? next;
    }

    void testConversion(LinkedList data) {
        /* do nothing */
    }

    LinkedList testBackConversion() {
        /* return a node that references itself as next node */
    }
]]

What happens in this situation:
[[
    var p={};
    p.value=true;
    p.next=p;

    testConversion(p);
]]

What happens if the same situation happens but is created in the WebIDL world
and has to be converted back a JavaScript object?
[[
    var p = testBackConversion();
]]

http://dev.w3.org/2006/webapi/WebIDL/#es-dictionary

[[
Let value be the result of converting idlValue to an ECMAScript value.
]]

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Received on Thursday, 31 January 2013 10:54:38 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:09 UTC