Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Unified Diff: webkit/port/bindings/v8/v8_proxy.cpp

Issue 17246: Add V8 bindings for Worker (Part I). (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/port/bindings/v8/v8_index.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/port/bindings/v8/v8_proxy.cpp
===================================================================
--- webkit/port/bindings/v8/v8_proxy.cpp (revision 8350)
+++ webkit/port/bindings/v8/v8_proxy.cpp (working copy)
@@ -192,6 +192,11 @@
#include "V8SVGPODTypeWrapper.h"
#endif // SVG
+#if ENABLE(WORKERS)
+#include "Worker.h"
+#include "WorkerLocation.h"
+#endif // WORKERS
+
#if ENABLE(XPATH)
#include "XPathEvaluator.h"
#endif
@@ -1772,6 +1777,18 @@
break;
}
+#if ENABLE(WORKERS)
+ case V8ClassIndex::WORKER: {
+ // Reserve one more internal field for keeping event listeners.
+ v8::Local<v8::ObjectTemplate> instance_template =
+ desc->InstanceTemplate();
+ instance_template->SetInternalFieldCount(
+ V8Custom::kWorkerInternalFieldCount);
+ desc->SetCallHandler(USE_CALLBACK(WorkerConstructor));
+ break;
+ }
+#endif // WORKERS
+
// The following objects are created from JavaScript.
case V8ClassIndex::DOMPARSER:
desc->SetCallHandler(USE_CALLBACK(DOMParserConstructor));
« no previous file with comments | « webkit/port/bindings/v8/v8_index.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698