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

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

Issue 23788005: Remove calls to HandleScope default ctor. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: code review (pfeldman) Created 7 years, 3 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 | Annotate | Revision Log
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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 128
129 #ifndef NDEBUG 129 #ifndef NDEBUG
130 bool V8DOMWrapper::maybeDOMWrapper(v8::Handle<v8::Value> value) 130 bool V8DOMWrapper::maybeDOMWrapper(v8::Handle<v8::Value> value)
131 { 131 {
132 if (!hasInternalField(value)) 132 if (!hasInternalField(value))
133 return false; 133 return false;
134 134
135 v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(value); 135 v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(value);
136 ASSERT(object->InternalFieldCount() >= v8DefaultWrapperInternalFieldCount); 136 ASSERT(object->InternalFieldCount() >= v8DefaultWrapperInternalFieldCount);
137 137
138 v8::HandleScope scope; 138 v8::HandleScope scope(v8::Isolate::GetCurrent());
139 ASSERT(object->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)); 139 ASSERT(object->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex));
140 140
141 return true; 141 return true;
142 } 142 }
143 #endif 143 #endif
144 144
145 bool V8DOMWrapper::isDOMWrapper(v8::Handle<v8::Value> value) 145 bool V8DOMWrapper::isDOMWrapper(v8::Handle<v8::Value> value)
146 { 146 {
147 if (value.IsEmpty() || !value->IsObject()) 147 if (value.IsEmpty() || !value->IsObject())
148 return false; 148 return false;
(...skipping 15 matching lines...) Expand all
164 164
165 v8::Handle<v8::Object> wrapper = v8::Handle<v8::Object>::Cast(value); 165 v8::Handle<v8::Object> wrapper = v8::Handle<v8::Object>::Cast(value);
166 ASSERT(wrapper->InternalFieldCount() >= v8DefaultWrapperInternalFieldCount); 166 ASSERT(wrapper->InternalFieldCount() >= v8DefaultWrapperInternalFieldCount);
167 ASSERT(wrapper->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) ; 167 ASSERT(wrapper->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) ;
168 168
169 WrapperTypeInfo* typeInfo = static_cast<WrapperTypeInfo*>(wrapper->GetAligne dPointerFromInternalField(v8DOMWrapperTypeIndex)); 169 WrapperTypeInfo* typeInfo = static_cast<WrapperTypeInfo*>(wrapper->GetAligne dPointerFromInternalField(v8DOMWrapperTypeIndex));
170 return typeInfo == type; 170 return typeInfo == type;
171 } 171 }
172 172
173 } // namespace WebCore 173 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/V8CustomElementLifecycleCallbacks.cpp ('k') | Source/bindings/v8/V8EventListenerList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698