<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>"It's complicated."</p>
<p>What are you actually trying to do? What does "use an internal
chrome:// url top open a dialog" mean - are you passing a chrome:
URL as the thing/target to open, or are you calling openDialog
from a chrome/system-privileged context (and if so, what's the
target URL, and what other params are you passing)? Or both? From
what "internal chrome:// url" are you doing this (not all chrome:
pages are equal)? What does "Writing ... doesn't work" mean? Does
it throw an exception? Does reading the value on the other end
throw an exception? Something else?</p>
<p>And what's the wider context here? Are you writing a patch for
Firefox itself, or something else?<br>
</p>
<p>At a guess, it sounds like you might be running into security
wrappers that prevent privileged code from touching unprivileged
non-simple JS things without jumping through hoops, because doing
so is likely to be a security risk (ie you could end up running
arbitrary unprivileged code in a privileged context and that would
be Bad) which is why it's normally prevented. But that's a guess,
and without more details about what you're doing it's hard to give
a more definitive answer to your question.<br>
</p>
<p>~ Gijs<br>
</p>
<div class="moz-cite-prefix">On 26/10/2018 04:31, <a class="moz-txt-link-abbreviated" href="mailto:sfcheng@gmail.com">sfcheng@gmail.com</a>
wrote:<br>
</div>
<blockquote type="cite" cite="mid:2018102522312876799883@gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<style>body { line-height: 1.5; }blockquote { margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em; }body { font-size: 10.5pt; font-family: 'Segoe UI'; color: rgb(0, 0, 0); line-height: 1.5; }</style>
<div><span></span>I found that if I use an internal chrome:// url
to open a dialog using window.openDialog, I can pass back return
value using window.arguments[n].value="*****" just fine.
However, if I use a file from the local file system, I wasn't
able pass back return value. Writing to
window.arguments[n].value doesn't work. I believe there is some
security restriction here. Does anyway know which part of the
C++ code is responsible for defining the security rules for
different url sources?</div>
<div><br>
</div>
<div>Thank you. </div>
<div><br>
</div>
<hr style="width: 210px; height: 1px;" size="1" color="#b5c4df"
align="left">
<div><span>
<div style="FONT-SIZE: 10pt; FONT-FAMILY: verdana; MARGIN:
10px">
<div>Rest Regards,</div>
<div>Shanfeng Cheng</div>
<div><a class="moz-txt-link-abbreviated" href="mailto:sfcheng@gmail.com">sfcheng@gmail.com</a></div>
</div>
</span></div>
<blockquote style="margin-top: 0px; margin-bottom: 0px;
margin-left: 0.5em;">
<div><br>
</div>
</blockquote>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
firefox-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:firefox-dev@mozilla.org">firefox-dev@mozilla.org</a>
<a class="moz-txt-link-freetext" href="https://mail.mozilla.org/listinfo/firefox-dev">https://mail.mozilla.org/listinfo/firefox-dev</a>
</pre>
</blockquote>
</body>
</html>