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

Unified Diff: samples/process.cc

Issue 2741683004: [rename] Rename internal field to embedder field. (Closed)
Patch Set: DEPRECATE_SOON(GetInternalField) Created 3 years, 9 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
Index: samples/process.cc
diff --git a/samples/process.cc b/samples/process.cc
index 29ddb5cf2f187c4c346ac1e633f923c0f78388f4..a8dbc0986fbf7a6c8ef4c0bc56610e088e9b7a6d 100644
--- a/samples/process.cc
+++ b/samples/process.cc
@@ -345,7 +345,7 @@ Local<Object> JsHttpRequestProcessor::WrapMap(map<string, string>* obj) {
Local<External> map_ptr = External::New(GetIsolate(), obj);
// Store the map pointer in the JavaScript wrapper.
- result->SetInternalField(0, map_ptr);
+ result->SetEmbedderField(0, map_ptr);
// Return the result through the current handle scope. Since each
// of these handles will go away when the handle scope is deleted
@@ -358,7 +358,7 @@ Local<Object> JsHttpRequestProcessor::WrapMap(map<string, string>* obj) {
// Utility function that extracts the C++ map pointer from a wrapper
// object.
map<string, string>* JsHttpRequestProcessor::UnwrapMap(Local<Object> obj) {
- Local<External> field = Local<External>::Cast(obj->GetInternalField(0));
+ Local<External> field = Local<External>::Cast(obj->GetEmbedderField(0));
void* ptr = field->Value();
return static_cast<map<string, string>*>(ptr);
}
@@ -421,7 +421,7 @@ Local<ObjectTemplate> JsHttpRequestProcessor::MakeMapTemplate(
EscapableHandleScope handle_scope(isolate);
Local<ObjectTemplate> result = ObjectTemplate::New(isolate);
- result->SetInternalFieldCount(1);
+ result->SetEmbedderFieldCount(1);
result->SetHandler(NamedPropertyHandlerConfiguration(MapGet, MapSet));
// Again, return the result through the current handle scope.
@@ -459,7 +459,7 @@ Local<Object> JsHttpRequestProcessor::WrapRequest(HttpRequest* request) {
Local<External> request_ptr = External::New(GetIsolate(), request);
// Store the request pointer in the JavaScript wrapper.
- result->SetInternalField(0, request_ptr);
+ result->SetEmbedderField(0, request_ptr);
// Return the result through the current handle scope. Since each
// of these handles will go away when the handle scope is deleted
@@ -474,7 +474,7 @@ Local<Object> JsHttpRequestProcessor::WrapRequest(HttpRequest* request) {
* wrapper object.
*/
HttpRequest* JsHttpRequestProcessor::UnwrapRequest(Local<Object> obj) {
- Local<External> field = Local<External>::Cast(obj->GetInternalField(0));
+ Local<External> field = Local<External>::Cast(obj->GetEmbedderField(0));
void* ptr = field->Value();
return static_cast<HttpRequest*>(ptr);
}
@@ -536,7 +536,7 @@ Local<ObjectTemplate> JsHttpRequestProcessor::MakeRequestTemplate(
EscapableHandleScope handle_scope(isolate);
Local<ObjectTemplate> result = ObjectTemplate::New(isolate);
- result->SetInternalFieldCount(1);
+ result->SetEmbedderFieldCount(1);
// Add accessors for each of the fields of the request.
result->SetAccessor(
« include/v8-experimental.h ('K') | « include/v8-util.h ('k') | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698