mirror of
				https://bitbucket.org/chromiumembedded/cef
				synced 2025-06-05 21:39:12 +02:00 
			
		
		
		
	Avoid line number assertion in V8
This commit is contained in:
		| @@ -240,8 +240,12 @@ void CefFrameHostImpl::SendJavaScript( | |||||||
|     int startLine) { |     int startLine) { | ||||||
|   if (jsCode.empty()) |   if (jsCode.empty()) | ||||||
|     return; |     return; | ||||||
|   if (startLine < 0) |   if (startLine <= 0) { | ||||||
|     startLine = 0; |     // A value of 0 is v8::Message::kNoLineNumberInfo in V8. There is code in | ||||||
|  |     // V8 that will assert on that value (e.g. V8StackTraceImpl::Frame::Frame | ||||||
|  |     // if a JS exception is thrown) so make sure |startLine| > 0. | ||||||
|  |     startLine = 1; | ||||||
|  |   } | ||||||
|  |  | ||||||
|   CefRefPtr<CefBrowserHostImpl> browser; |   CefRefPtr<CefBrowserHostImpl> browser; | ||||||
|   int64 frame_id; |   int64 frame_id; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user