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

Unified Diff: Source/bindings/dart/DartHandleProxy.cpp

Issue 289083003: [dartium] Dart half of ScriptValue refactoring. (Closed) Base URL: svn://svn.chromium.org/blink/branches/dart/1916
Patch Set: Created 6 years, 7 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 | « Source/bindings/dart/DartHandleProxy.h ('k') | Source/bindings/dart/DartJsInterop.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/dart/DartHandleProxy.cpp
diff --git a/Source/bindings/dart/DartHandleProxy.cpp b/Source/bindings/dart/DartHandleProxy.cpp
index 7ae10cb62eeccf1fdaf444ffd4153a400ed9ad1a..e4f43365efa9d6de5ccb4e279ab77efb91c027e0 100644
--- a/Source/bindings/dart/DartHandleProxy.cpp
+++ b/Source/bindings/dart/DartHandleProxy.cpp
@@ -32,7 +32,7 @@
#include "DartNode.h"
#include "bindings/dart/DartJsInterop.h"
-#include "bindings/dart/DartScriptValue.h"
+#include "bindings/dart/DartPersistentValue.h"
#include "bindings/dart/V8Converter.h"
#include "bindings/v8/PageScriptDebugServer.h"
#include "bindings/v8/ScriptController.h"
@@ -47,7 +47,7 @@ namespace WebCore {
struct DartHandleProxy::CallbackData {
ScopedPersistent<v8::Object> handle;
- DartScriptValue* value;
+ DartPersistentValue* value;
};
typedef HashMap<String, v8::Persistent<v8::FunctionTemplate>* > FunctionTemplateMap;
@@ -58,10 +58,10 @@ static v8::Local<v8::FunctionTemplate> libraryProxyTemplate(v8::Handle<v8::Strin
static v8::Local<v8::FunctionTemplate> typeProxyTemplate(Dart_Handle type);
static v8::Local<v8::FunctionTemplate> frameProxyTemplate();
-DartScriptValue* DartHandleProxy::readPointerFromProxy(v8::Handle<v8::Value> proxy)
+DartPersistentValue* DartHandleProxy::readPointerFromProxy(v8::Handle<v8::Value> proxy)
{
void* pointer = proxy.As<v8::Object>()->GetAlignedPointerFromInternalField(0);
- return static_cast<DartScriptValue*>(pointer);
+ return static_cast<DartPersistentValue*>(pointer);
}
bool DartHandleProxy::isDartProxy(v8::Handle<v8::Value> value)
@@ -291,7 +291,7 @@ void setReturnValue(CallbackInfo info, Dart_Handle result)
void DartHandleProxy::writePointerToProxy(v8::Local<v8::Object> proxy, Dart_Handle value)
{
ASSERT(!proxy.IsEmpty());
- DartScriptValue* dartScriptValue = new DartScriptValue(value);
+ DartPersistentValue* dartScriptValue = new DartPersistentValue(value);
proxy->SetAlignedPointerInInternalField(0, dartScriptValue);
v8::Isolate* isolate = v8::Isolate::GetCurrent();
v8::Persistent<v8::Object> persistentHandle;
@@ -1077,7 +1077,7 @@ v8::Handle<v8::Value> DartHandleProxy::createTypeProxy(Dart_Handle value, bool s
*/
const char* DartHandleProxy::getJavaScriptType(v8::Handle<v8::Value> value)
{
- DartScriptValue* scriptValue = readPointerFromProxy(value);
+ DartPersistentValue* scriptValue = readPointerFromProxy(value);
ASSERT(scriptValue->isIsolateAlive());
DartIsolateScope scope(scriptValue->isolate());
DartApiScope apiScope;
@@ -1096,7 +1096,7 @@ const char* DartHandleProxy::getJavaScriptType(v8::Handle<v8::Value> value)
Node* DartHandleProxy::toNativeNode(v8::Handle<v8::Value> value)
{
- DartScriptValue* scriptValue = readPointerFromProxy(value);
+ DartPersistentValue* scriptValue = readPointerFromProxy(value);
ASSERT(scriptValue->isIsolateAlive());
DartIsolateScope scope(scriptValue->isolate());
DartApiScope apiScope;
« no previous file with comments | « Source/bindings/dart/DartHandleProxy.h ('k') | Source/bindings/dart/DartJsInterop.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698