| Index: content/renderer/gin_browsertest.cc
|
| diff --git a/content/renderer/gin_browsertest.cc b/content/renderer/gin_browsertest.cc
|
| index 3f69fbb8ab8a558384a7acd26b53dffe4385ac34..df30546ab88091545fcb39f52456c5f89d47bee0 100644
|
| --- a/content/renderer/gin_browsertest.cc
|
| +++ b/content/renderer/gin_browsertest.cc
|
| @@ -7,6 +7,7 @@
|
| #include "content/public/test/render_view_test.h"
|
| #include "content/renderer/render_view_impl.h"
|
| #include "gin/handle.h"
|
| +#include "gin/object_template_builder.h"
|
| #include "gin/per_isolate_data.h"
|
| #include "gin/wrappable.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| @@ -27,6 +28,11 @@ class TestGinObject : public gin::Wrappable<TestGinObject> {
|
| }
|
|
|
| private:
|
| + friend class gin::Wrappable<TestGinObject>;
|
| + static v8::Local<v8::ObjectTemplate> GetObjectTemplate(v8::Isolate* isolate) {
|
| + return gin::ObjectTemplateBuilder(isolate).Build();
|
| + }
|
| +
|
| TestGinObject(bool* alive) : alive_(alive) { *alive_ = true; }
|
| virtual ~TestGinObject() { *alive_ = false; }
|
|
|
| @@ -37,14 +43,6 @@ class TestGinObject : public gin::Wrappable<TestGinObject> {
|
|
|
| gin::WrapperInfo TestGinObject::kWrapperInfo = { gin::kEmbedderNativeGin };
|
|
|
| -void RegisterTemplates(v8::Isolate* isolate) {
|
| - gin::PerIsolateData* data = gin::PerIsolateData::From(isolate);
|
| -
|
| - v8::Handle<v8::ObjectTemplate> templ = v8::ObjectTemplate::New(isolate);
|
| - templ->SetInternalFieldCount(gin::kNumberOfInternalFields);
|
| - data->SetObjectTemplate(&TestGinObject::kWrapperInfo, templ);
|
| -}
|
| -
|
| class GinBrowserTest : public RenderViewTest {
|
| public:
|
| GinBrowserTest() {}
|
| @@ -75,8 +73,6 @@ TEST_F(GinBrowserTest, GinAndGarbageCollection) {
|
| v8::Context::Scope context_scope(
|
| view_->GetWebView()->mainFrame()->mainWorldScriptContext());
|
|
|
| - RegisterTemplates(isolate);
|
| -
|
| // We create the object inside a scope so it's not kept alive by a handle
|
| // on the stack.
|
| TestGinObject::Create(isolate, &alive);
|
|
|