<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>27305</bug_id>
          
          <creation_ts>2014-11-11 20:06:22 +0000</creation_ts>
          <short_desc>&quot;Perform type mapping as specified in [WEBIDL] for data.&quot;</short_desc>
          <delta_ts>2016-05-23 22:47:25 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Web Cryptography</product>
          <component>Web Cryptography API Document</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Anne">annevk</reporter>
          <assigned_to name="Ryan Sleevi">sleevi</assigned_to>
          <cc>bzbarsky</cc>
    
    <cc>public-webcrypto</cc>
    
    <cc>watsonm</cc>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>114810</commentid>
    <comment_count>0</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-11-11 20:06:22 +0000</bug_when>
    <thetext>IDL does this before the algorithm is invoked so there is no need to have this step anywhere. Also, the point where you try to perform it would lead to racing issues, as that part (potentially) runs in parallel with other JavaScript in the document.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>114811</commentid>
    <comment_count>1</comment_count>
    <who name="Ryan Sleevi">sleevi</who>
    <bug_when>2014-11-11 20:11:21 +0000</bug_when>
    <thetext>Could you provide clarification as to which instance you&apos;re talking about? I believe it&apos;s https://dvcs.w3.org/hg/webcrypto-api/raw-file/6694484cc545/spec/Overview.html#SubtleCrypto-method-wrapKey for jwk, but I wanted to make sure?

I&apos;m not sure the racing issues you describe, or why they&apos;d be any different than http://heycam.github.io/webidl/#es-promise , but I guess if you can explain your concern in more detail, we can see what can be done.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>114812</commentid>
    <comment_count>2</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-11-11 20:31:28 +0000</bug_when>
    <thetext>I was looking at an outdated version of the draft that used it more frequently.

The problem with converting a value late rather than at the boundary is that it can invoke JavaScript that runs in the scope of the page (ToObject, ToString, etc. have side effects). Now if you invoke JavaScript in parallel with other JavaScript, you&apos;ve hit something that&apos;s undefined and will most likely crash.

Anyway, there in step 14 /key/ will already have been converted due to it crossing the boundaries JavaScript -&gt; IDL -&gt; API specification, so you can just remove the statement and be done with it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126489</commentid>
    <comment_count>3</comment_count>
    <who name="Mark Watson">watsonm</who>
    <bug_when>2016-05-23 22:47:25 +0000</bug_when>
    <thetext>I believe this has already been fixed.

Step 14 or wrapKey refers to conversion *back* from an IDL object to an ECMAScript object which can then be stringified in the next step.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>