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

Side by Side Diff: Source/bindings/core/v8/V8DOMWrapper.cpp

Issue 1071963002: Replace Handle<> with Local<> in bindings/core/v8 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 8 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 unified diff | Download patch
« no previous file with comments | « Source/bindings/core/v8/V8DOMWrapper.h ('k') | Source/bindings/core/v8/V8EventListenerList.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 v8::Local<v8::Object> shadow = V8ScriptRunner::instantiateObject(isolate, sh adowConstructor); 64 v8::Local<v8::Object> shadow = V8ScriptRunner::instantiateObject(isolate, sh adowConstructor);
65 if (shadow.IsEmpty()) 65 if (shadow.IsEmpty())
66 return v8::Local<v8::Object>(); 66 return v8::Local<v8::Object>();
67 if (!v8CallBoolean(shadow->SetPrototype(isolate->GetCurrentContext(), wrappe r))) 67 if (!v8CallBoolean(shadow->SetPrototype(isolate->GetCurrentContext(), wrappe r)))
68 return v8::Local<v8::Object>(); 68 return v8::Local<v8::Object>();
69 V8DOMWrapper::setNativeInfo(wrapper, &V8HTMLDocument::wrapperTypeInfo, scrip tWrappable); 69 V8DOMWrapper::setNativeInfo(wrapper, &V8HTMLDocument::wrapperTypeInfo, scrip tWrappable);
70 return shadow; 70 return shadow;
71 } 71 }
72 72
73 v8::Local<v8::Object> V8DOMWrapper::createWrapper(v8::Isolate* isolate, v8::Hand le<v8::Object> creationContext, const WrapperTypeInfo* type, ScriptWrappable* sc riptWrappable) 73 v8::Local<v8::Object> V8DOMWrapper::createWrapper(v8::Isolate* isolate, v8::Loca l<v8::Object> creationContext, const WrapperTypeInfo* type, ScriptWrappable* scr iptWrappable)
74 { 74 {
75 V8WrapperInstantiationScope scope(creationContext, isolate); 75 V8WrapperInstantiationScope scope(creationContext, isolate);
76 76
77 V8PerContextData* perContextData = V8PerContextData::from(scope.context()); 77 V8PerContextData* perContextData = V8PerContextData::from(scope.context());
78 v8::Local<v8::Object> wrapper = perContextData ? perContextData->createWrapp erFromCache(type) : V8ObjectConstructor::newInstance(isolate, type->domTemplate( isolate)->GetFunction()); 78 v8::Local<v8::Object> wrapper = perContextData ? perContextData->createWrapp erFromCache(type) : V8ObjectConstructor::newInstance(isolate, type->domTemplate( isolate)->GetFunction());
79 79
80 if (type == &V8HTMLDocument::wrapperTypeInfo && !wrapper.IsEmpty()) 80 if (type == &V8HTMLDocument::wrapperTypeInfo && !wrapper.IsEmpty())
81 wrapper = wrapInShadowTemplate(wrapper, scriptWrappable, isolate); 81 wrapper = wrapInShadowTemplate(wrapper, scriptWrappable, isolate);
82 82
83 return wrapper; 83 return wrapper;
(...skipping 25 matching lines...) Expand all
109 return false; 109 return false;
110 110
111 const ScriptWrappable* untrustedScriptWrappable = toScriptWrappable(object); 111 const ScriptWrappable* untrustedScriptWrappable = toScriptWrappable(object);
112 const WrapperTypeInfo* untrustedWrapperTypeInfo = toWrapperTypeInfo(object); 112 const WrapperTypeInfo* untrustedWrapperTypeInfo = toWrapperTypeInfo(object);
113 return untrustedScriptWrappable 113 return untrustedScriptWrappable
114 && untrustedWrapperTypeInfo 114 && untrustedWrapperTypeInfo
115 && untrustedWrapperTypeInfo->ginEmbedder == gin::kEmbedderBlink; 115 && untrustedWrapperTypeInfo->ginEmbedder == gin::kEmbedderBlink;
116 } 116 }
117 117
118 } // namespace blink 118 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/V8DOMWrapper.h ('k') | Source/bindings/core/v8/V8EventListenerList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698