summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrei Popescu <andreip@google.com>2009-07-21 12:48:46 +0100
committerAndrei Popescu <andreip@google.com>2009-07-21 18:43:29 +0100
commitf9fb0fa96602f114a65681caede6ba917133ee99 (patch)
treec8cd775a06e40540d962d63aed48758d27ec0fec
parentce39e03a248f9bee3e746c15e7961b3e40a871ed (diff)
downloadexternal_webkit-f9fb0fa96602f114a65681caede6ba917133ee99.zip
external_webkit-f9fb0fa96602f114a65681caede6ba917133ee99.tar.gz
external_webkit-f9fb0fa96602f114a65681caede6ba917133ee99.tar.bz2
Add TODO(andreip) to those v8 binding files that have Android-specific modifications that may need fixing/upstreaming/etc
-rw-r--r--V8Binding/binding/NPV8Object.cpp4
-rw-r--r--V8Binding/binding/NPV8Object.h1
-rw-r--r--V8Binding/binding/V8NPObject.h1
-rw-r--r--V8Binding/binding/V8NPUtils.h1
-rw-r--r--V8Binding/binding/npruntime_priv.h2
-rw-r--r--V8Binding/binding/v8_helpers.h1
-rw-r--r--V8Binding/binding/v8_index.cpp2
-rw-r--r--V8Binding/binding/v8_index.h4
-rw-r--r--V8Binding/binding/v8_proxy.cpp14
-rw-r--r--V8Binding/npapi/npapi.h1
-rw-r--r--V8Binding/scripts/CodeGeneratorV8.pm2
11 files changed, 30 insertions, 3 deletions
diff --git a/V8Binding/binding/NPV8Object.cpp b/V8Binding/binding/NPV8Object.cpp
index 3bd55d7..6dccae1 100644
--- a/V8Binding/binding/NPV8Object.cpp
+++ b/V8Binding/binding/NPV8Object.cpp
@@ -33,6 +33,7 @@
#include <v8.h>
#include "NPV8Object.h"
#if PLATFORM(CHROMIUM)
+// TODO(andreip): upstream
#include "ChromiumBridge.h"
#endif
#include "Frame.h"
@@ -285,7 +286,8 @@ bool NPN_Evaluate(NPP npp, NPObject *npobj, NPString *npscript, NPVariant *resul
#if PLATFORM(CHROMIUM)
bool popupsAllowed = WebCore::ChromiumBridge::popupsAllowed(npp);
#else
- // TODO(fqian): create an Android bridge
+ // TODO(andreip): Some of the binding code is specific to Chromium
+ // and we don't want it to Android. What is the preferred way to handle this?
bool popupsAllowed = false;
#endif
return NPN_EvaluateHelper(npp, popupsAllowed, npobj, npscript, result);
diff --git a/V8Binding/binding/NPV8Object.h b/V8Binding/binding/NPV8Object.h
index 1b9713e..ad4b973 100644
--- a/V8Binding/binding/NPV8Object.h
+++ b/V8Binding/binding/NPV8Object.h
@@ -6,6 +6,7 @@
#define np_v8object_h
#if PLATFORM(CHROMIUM)
+// TODO(andreip): diff and consolidate
#include "bindings/npruntime.h"
#else
#include "bridge/npruntime.h" // use WebCore version
diff --git a/V8Binding/binding/V8NPObject.h b/V8Binding/binding/V8NPObject.h
index e18ed3d..ad39f5e 100644
--- a/V8Binding/binding/V8NPObject.h
+++ b/V8Binding/binding/V8NPObject.h
@@ -33,6 +33,7 @@
#include <v8.h>
#if PLATFORM(CHROMIUM)
+// TODO(andreip): diff and consolidate.
#include "third_party/npapi/bindings/npruntime.h"
#else
#include "bridge/npruntime.h" // use WebCore version
diff --git a/V8Binding/binding/V8NPUtils.h b/V8Binding/binding/V8NPUtils.h
index 2e07e66..1fd8fd6 100644
--- a/V8Binding/binding/V8NPUtils.h
+++ b/V8Binding/binding/V8NPUtils.h
@@ -7,6 +7,7 @@
#include <v8.h>
#if PLATFORM(CHROMIUM)
+// TODO(andreip): diff and consolidate.
#include "third_party/npapi/bindings/npruntime.h"
#else
#include "bridge/npruntime.h" // use WebCore version
diff --git a/V8Binding/binding/npruntime_priv.h b/V8Binding/binding/npruntime_priv.h
index 8b1ddec..cbcc668 100644
--- a/V8Binding/binding/npruntime_priv.h
+++ b/V8Binding/binding/npruntime_priv.h
@@ -27,6 +27,8 @@
#define NP_RUNTIME_PRIV_H_
#if PLATFORM(CHROMIUM)
+// TODO(andreip): look at the diff between the two npruntime.h files
+// and try to consolidate them.
#include "third_party/npapi/bindings/npruntime.h"
#else
#include "bridge/npruntime.h"
diff --git a/V8Binding/binding/v8_helpers.h b/V8Binding/binding/v8_helpers.h
index b7f15aa..e741e82 100644
--- a/V8Binding/binding/v8_helpers.h
+++ b/V8Binding/binding/v8_helpers.h
@@ -6,6 +6,7 @@
#define V8_HELPERS_H__
#if PLATFORM(CHROMIUM)
+// TODO(andreip): diff and consolidate
#include "third_party/npapi/bindings/npruntime.h"
#else
#include "bridge/npruntime.h" // use WebCore version
diff --git a/V8Binding/binding/v8_index.cpp b/V8Binding/binding/v8_index.cpp
index e002dd3..e732031 100644
--- a/V8Binding/binding/v8_index.cpp
+++ b/V8Binding/binding/v8_index.cpp
@@ -208,10 +208,12 @@
#endif
#if PLATFORM(CHROMIUM)
+// TODO(andreip): use the WebKit inspector flag instead.
#include "V8InspectorController.h"
#endif
#if PLATFORM(CHROMIUM) || ENABLE(DATABASE)
+// TODO(andreip): patch chromium to use the flag?
#include "V8Database.h"
#include "V8SQLError.h"
#include "V8SQLResultSet.h"
diff --git a/V8Binding/binding/v8_index.h b/V8Binding/binding/v8_index.h
index 12efa0b..2a809e1 100644
--- a/V8Binding/binding/v8_index.h
+++ b/V8Binding/binding/v8_index.h
@@ -366,6 +366,8 @@ typedef v8::Persistent<v8::FunctionTemplate> (*FunctionTemplateFactory)();
#endif
#if PLATFORM(CHROMIUM)
+// TODO(andreip): clean up using the individual flags that are
+// feature-specific.
#define DOM_OBJECT_TYPES(V) \
DOM_OBJECT_TYPES_1(V) \
DOM_OBJECT_TYPES_2(V) \
@@ -376,6 +378,8 @@ typedef v8::Persistent<v8::FunctionTemplate> (*FunctionTemplateFactory)();
#endif
#if PLATFORM(ANDROID)
+// TODO(andreip): clean up using the individual flags that are
+// feature-specific (DATABASE, XSLT, TOUCH, etc)
#define DOM_OBJECT_TYPES(V) \
DOM_OBJECT_TYPES_1(V) \
DOM_OBJECT_TYPES_2(V) \
diff --git a/V8Binding/binding/v8_proxy.cpp b/V8Binding/binding/v8_proxy.cpp
index bc0b550..d8d6b66 100644
--- a/V8Binding/binding/v8_proxy.cpp
+++ b/V8Binding/binding/v8_proxy.cpp
@@ -339,6 +339,8 @@ typedef Vector<GrouperPair> GrouperList;
#if PLATFORM(ANDROID)
// Sort GrouperPair by the group id. Node* is only involved to sort within
// a group id, so it will be fine.
+// TODO(andreip): used by std::stable_sort function. We can implement
+// the std::sort function and remove this one.
static bool ComparePair(const GrouperPair& p1, const GrouperPair& p2) {
return p1.first < p2.first;
}
@@ -452,6 +454,7 @@ ACTIVE_DOM_OBJECT_TYPES(MAKE_CASE)
}
#if PLATFORM(ANDROID)
+ // TODO(andreip): implement std::sort() and get rid of this.
std::stable_sort<GrouperPair>(grouper.begin(), grouper.end(), ComparePair);
#else
// Group by sorting by the group id. This will use the std::pair operator<,
@@ -1021,6 +1024,7 @@ bool V8Proxy::HandleOutOfMemory()
}
#if PLATFORM(CHROMIUM)
+ // TODO(andreip): ChromeBridge->BrowserBridge?
ChromiumBridge::notifyJSOutOfMemory(frame);
#endif
// Disable JS.
@@ -1078,6 +1082,7 @@ v8::Local<v8::Value> V8Proxy::evaluate(const ScriptSourceCode& source, Node* n)
// Compile the script.
v8::Local<v8::String> code = v8ExternalString(source.source());
#if PLATFORM(CHROMIUM)
+ // TODO(andreip): ChromeBridge->BrowserBridge?
ChromiumBridge::traceEventBegin("v8.compile", n, "");
#endif
@@ -1086,6 +1091,7 @@ v8::Local<v8::Value> V8Proxy::evaluate(const ScriptSourceCode& source, Node* n)
v8::Handle<v8::Script> script = CompileScript(code, source.url(),
source.startLine() - 1);
#if PLATFORM(CHROMIUM)
+ // TODO(andreip): ChromeBridge->BrowserBridge?
ChromiumBridge::traceEventEnd("v8.compile", n, "");
ChromiumBridge::traceEventBegin("v8.run", n, "");
#endif
@@ -1104,6 +1110,7 @@ v8::Local<v8::Value> V8Proxy::evaluate(const ScriptSourceCode& source, Node* n)
result = RunScript(script, source.url().string().isNull());
}
#if PLATFORM(CHROMIUM)
+ // TODO(andreip): ChromeBridge->BrowserBridge?
ChromiumBridge::traceEventEnd("v8.run", n, "");
#endif
return result;
@@ -1849,6 +1856,7 @@ bool V8Proxy::isEnabled()
// embedder to allow them to override policy here.
#if PLATFORM(CHROMIUM)
+ // TODO(andreip): ChromeBridge->BrowserBridge?
if (origin->protocol() == ChromiumBridge::uiResourceProtocol())
return true; // Embedder's scripts are ok to run
#endif
@@ -1857,7 +1865,7 @@ bool V8Proxy::isEnabled()
// listing, which requires JavaScript to function properly.
const char* kDirProtocols[] = { "ftp", "file" };
#if PLATFORM(ANDROID)
- // TODO(fqian): port arraysize function to Android.
+ // TODO(andreip): port arraysize function to Android. There's one in Gears.
for (size_t i = 0; i < 2; ++i) {
#else
for (size_t i = 0; i < arraysize(kDirProtocols); ++i) {
@@ -3472,7 +3480,9 @@ void V8Proxy::CreateUtilityContext() {
int V8Proxy::GetSourceLineNumber() {
-#if PLATFORM(ANDROID)
+#if PLATFORM(ANDROID)
+ // TODO(andreip): consider V8's DEBUG flag here, rather than PLATFORM(ANDROID)
+ // or, even better, the WEBKIT inspector flag.
return 0;
#else
v8::HandleScope scope;
diff --git a/V8Binding/npapi/npapi.h b/V8Binding/npapi/npapi.h
index 3022984..320241e 100644
--- a/V8Binding/npapi/npapi.h
+++ b/V8Binding/npapi/npapi.h
@@ -356,6 +356,7 @@ typedef enum {
#endif
#ifdef ANDROID
+ // TODO(andreip): Remove?
NPPFakeValueToForce32Bits = 0x7FFFFFFF
#endif
} NPPVariable;
diff --git a/V8Binding/scripts/CodeGeneratorV8.pm b/V8Binding/scripts/CodeGeneratorV8.pm
index af288ff..a44f2cc 100644
--- a/V8Binding/scripts/CodeGeneratorV8.pm
+++ b/V8Binding/scripts/CodeGeneratorV8.pm
@@ -24,6 +24,8 @@
# Boston, MA 02111-1307, USA.
#
+#TODO(andreip): diff and consolidate.
+
package CodeGeneratorV8;
use File::stat;