mirror of
				https://bitbucket.org/chromiumembedded/cef
				synced 2025-06-05 21:39:12 +02:00 
			
		
		
		
	Fix crash calling GetUserData on a non-user V8 object (fixes issue #3438)
This commit is contained in:
		| @@ -295,7 +295,8 @@ class V8TrackObject : public CefTrackNode { | |||||||
|   static V8TrackObject* Unwrap(v8::Local<v8::Context> context, |   static V8TrackObject* Unwrap(v8::Local<v8::Context> context, | ||||||
|                                v8::Local<v8::Object> object) { |                                v8::Local<v8::Object> object) { | ||||||
|     v8::Local<v8::Value> value; |     v8::Local<v8::Value> value; | ||||||
|     if (GetPrivate(context, object, kCefTrackObject, &value)) { |     if (GetPrivate(context, object, kCefTrackObject, &value) && | ||||||
|  |         value->IsExternal()) { | ||||||
|       return static_cast<V8TrackObject*>(v8::External::Cast(*value)->Value()); |       return static_cast<V8TrackObject*>(v8::External::Cast(*value)->Value()); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @@ -351,7 +352,8 @@ class V8TrackArrayBuffer : public CefTrackNode { | |||||||
|   static V8TrackArrayBuffer* Unwrap(v8::Local<v8::Context> context, |   static V8TrackArrayBuffer* Unwrap(v8::Local<v8::Context> context, | ||||||
|                                     v8::Local<v8::Object> object) { |                                     v8::Local<v8::Object> object) { | ||||||
|     v8::Local<v8::Value> value; |     v8::Local<v8::Value> value; | ||||||
|     if (GetPrivate(context, object, kCefTrackObject, &value)) { |     if (GetPrivate(context, object, kCefTrackObject, &value) && | ||||||
|  |         value->IsExternal()) { | ||||||
|       return static_cast<V8TrackArrayBuffer*>( |       return static_cast<V8TrackArrayBuffer*>( | ||||||
|           v8::External::Cast(*value)->Value()); |           v8::External::Cast(*value)->Value()); | ||||||
|     } |     } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user