WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
22719
Implement Navigator object in Workers
https://bugs.webkit.org/show_bug.cgi?id=22719
Summary
Implement Navigator object in Workers
Alexey Proskuryakov
Reported
2008-12-07 03:16:09 PST
This method of user agent detection was requested multiple times, and draft spec has it: <
http://www.whatwg.org/specs/web-workers/current-work/#navigator0
>.
Attachments
proposed patch
(43.65 KB, patch)
2008-12-09 08:57 PST
,
Alexey Proskuryakov
darin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2008-12-07 03:57:48 PST
<
rdar://problem/6425805
>
Alexey Proskuryakov
Comment 2
2008-12-09 08:57:24 PST
Created
attachment 25888
[details]
proposed patch
Darin Adler
Comment 3
2008-12-09 09:11:10 PST
Comment on
attachment 25888
[details]
proposed patch
> +JSValue* jsWorkerContextNavigator(JSC::ExecState* exec, const Identifier&, const PropertySlot& slot) > +{ > + WorkerContext* imp = static_cast<WorkerContext*>(static_cast<JSWorkerContext*>(asObject(slot.slotBase()))->impl()); > + return toJS(exec, imp->navigator()); > +}
It's always irritating when we have to add a new DOM binding written by hand. I trust there's a good reason, and I will settle for just complaining about it rather than asking you to do something.
> +2008-12-09 Alexey Proskuryakov <
ap@webkit.org
> > + > + Reviewed by NOBODY (OOPS!). > + > +
https://bugs.webkit.org/show_bug.cgi?id=22719
> + Implement Navigator object in Workers > + > + * fast/workers/worker-navigator-expected.txt: Added. > + * fast/workers/worker-navigator.html: Added. > + > +2008-12-09 Alexey Proskuryakov <
ap@webkit.org
> > + > + Reviewed by NOBODY (OOPS!). > + > + <
rdar://problem/5959165
> Crash in a number of iExploder tests in WebCore::CachedImage::notifyObservers > + > + Add a test for a crash that is no longer reproducible. > + > + * fast/css/mask-missing-image-crash-expected.txt: Added. > + * fast/css/mask-missing-image-crash.html: Added. > +
Change log entry here from the other bug fix. r=me
Alexey Proskuryakov
Comment 4
2008-12-09 09:59:22 PST
Committed revision 39138. I will look into auto-generating JSWorkerContext in the future - I couldn't find any way to do it before.
Holger Freyther
Comment 5
2008-12-13 15:34:35 PST
> +worker.postMessage("eval navigator.platform.length > 0");
This is failing on the Gtk+ buildbot and according to my version of the HTML5 draft platform may be the zero length. Maybe you should check the type to be a string?
Alexey Proskuryakov
Comment 6
2008-12-14 02:08:00 PST
(In reply to
comment #5
)
> This is failing on the Gtk+ buildbot and according to my version of the HTML5 > draft platform may be the zero length. Maybe you should check the type to be a > string?
Done,
r39290
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug