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

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

Issue 683003002: Move the v8::Isolate* parameter to the first parameter of various binding methods in third_party/We… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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/V8NPObject.cpp ('k') | Source/web/WebPluginContainerImpl.cpp » ('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) 2008, 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2008, 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 case NPVariantType_Void: 93 case NPVariantType_Void:
94 return v8::Undefined(isolate); 94 return v8::Undefined(isolate);
95 case NPVariantType_String: { 95 case NPVariantType_String: {
96 NPString src = NPVARIANT_TO_STRING(*variant); 96 NPString src = NPVARIANT_TO_STRING(*variant);
97 return v8::String::NewFromUtf8(isolate, src.UTF8Characters, v8::String:: kNormalString, src.UTF8Length); 97 return v8::String::NewFromUtf8(isolate, src.UTF8Characters, v8::String:: kNormalString, src.UTF8Length);
98 } 98 }
99 case NPVariantType_Object: { 99 case NPVariantType_Object: {
100 NPObject* object = NPVARIANT_TO_OBJECT(*variant); 100 NPObject* object = NPVARIANT_TO_OBJECT(*variant);
101 if (V8NPObject* v8Object = npObjectToV8NPObject(object)) 101 if (V8NPObject* v8Object = npObjectToV8NPObject(object))
102 return v8::Local<v8::Object>::New(isolate, v8Object->v8Object); 102 return v8::Local<v8::Object>::New(isolate, v8Object->v8Object);
103 return createV8ObjectForNPObject(object, owner, isolate); 103 return createV8ObjectForNPObject(isolate, object, owner);
104 } 104 }
105 default: 105 default:
106 return v8::Undefined(isolate); 106 return v8::Undefined(isolate);
107 } 107 }
108 } 108 }
109 109
110 // Helper function to create an NPN String Identifier from a v8 string. 110 // Helper function to create an NPN String Identifier from a v8 string.
111 NPIdentifier getStringIdentifier(v8::Handle<v8::String> str) 111 NPIdentifier getStringIdentifier(v8::Handle<v8::String> str)
112 { 112 {
113 const int kStackBufferSize = 100; 113 const int kStackBufferSize = 100;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 ExceptionCatcher::~ExceptionCatcher() 162 ExceptionCatcher::~ExceptionCatcher()
163 { 163 {
164 if (!m_tryCatch.HasCaught()) 164 if (!m_tryCatch.HasCaught())
165 return; 165 return;
166 166
167 if (topHandler) 167 if (topHandler)
168 topHandler->handler(topHandler->data, *v8::String::Utf8Value(m_tryCatch. Exception())); 168 topHandler->handler(topHandler->data, *v8::String::Utf8Value(m_tryCatch. Exception()));
169 } 169 }
170 170
171 } // namespace blink 171 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/V8NPObject.cpp ('k') | Source/web/WebPluginContainerImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698