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

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

Issue 176963017: Remove WrapperWorldType from V8 binding (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/bindings/v8/V8ErrorHandler.cpp ('k') | Source/bindings/v8/V8PerIsolateData.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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 return instanceTemplate->Clone(); 145 return instanceTemplate->Clone();
146 } 146 }
147 return v8::Local<v8::Object>(); 147 return v8::Local<v8::Object>();
148 } 148 }
149 149
150 v8::Local<v8::Function> V8PerContextData::constructorForTypeSlowCase(const Wrapp erTypeInfo* type) 150 v8::Local<v8::Function> V8PerContextData::constructorForTypeSlowCase(const Wrapp erTypeInfo* type)
151 { 151 {
152 ASSERT(!m_errorPrototype.isEmpty()); 152 ASSERT(!m_errorPrototype.isEmpty());
153 153
154 v8::Context::Scope scope(context()); 154 v8::Context::Scope scope(context());
155 v8::Handle<v8::FunctionTemplate> functionTemplate = type->domTemplate(m_isol ate, worldType(m_isolate)); 155 v8::Handle<v8::FunctionTemplate> functionTemplate = type->domTemplate(m_isol ate);
156 // Getting the function might fail if we're running out of stack or memory. 156 // Getting the function might fail if we're running out of stack or memory.
157 v8::TryCatch tryCatch; 157 v8::TryCatch tryCatch;
158 v8::Local<v8::Function> function = functionTemplate->GetFunction(); 158 v8::Local<v8::Function> function = functionTemplate->GetFunction();
159 if (function.IsEmpty()) 159 if (function.IsEmpty())
160 return v8::Local<v8::Function>(); 160 return v8::Local<v8::Function>();
161 161
162 if (type->parentClass) { 162 if (type->parentClass) {
163 v8::Local<v8::Object> prototypeTemplate = constructorForType(type->paren tClass); 163 v8::Local<v8::Object> prototypeTemplate = constructorForType(type->paren tClass);
164 if (prototypeTemplate.IsEmpty()) 164 if (prototypeTemplate.IsEmpty())
165 return v8::Local<v8::Function>(); 165 return v8::Local<v8::Function>();
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 if (!data->IsString()) 256 if (!data->IsString())
257 return -1; 257 return -1;
258 v8::String::Utf8Value utf8(data); 258 v8::String::Utf8Value utf8(data);
259 char* comma = strnstr(*utf8, ",", utf8.length()); 259 char* comma = strnstr(*utf8, ",", utf8.length());
260 if (!comma) 260 if (!comma)
261 return -1; 261 return -1;
262 return atoi(comma + 1); 262 return atoi(comma + 1);
263 } 263 }
264 264
265 } // namespace WebCore 265 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/V8ErrorHandler.cpp ('k') | Source/bindings/v8/V8PerIsolateData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698