summarylogtreecommitdiffstats
path: root/cef91.patch
blob: c8fd75db2210d285d1051c684a6f34c1a5d7cd64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
diff --git a/browser-app.cpp b/browser-app.cpp
index f0aba74..df16c0a 100644
--- a/browser-app.cpp
+++ b/browser-app.cpp
@@ -117,7 +117,7 @@ void BrowserApp::OnContextCreated(CefRefPtr<CefBrowser> browser,
 {
 	CefRefPtr<CefV8Value> globalObj = context->GetGlobal();
 
-	CefRefPtr<CefV8Value> obsStudioObj = CefV8Value::CreateObject(0, 0);
+	CefRefPtr<CefV8Value> obsStudioObj = CefV8Value::CreateObject(nullptr, nullptr);
 	globalObj->SetValue("obsstudio", obsStudioObj,
 			    V8_PROPERTY_ATTRIBUTE_NONE);
 
@@ -154,7 +154,7 @@ void BrowserApp::ExecuteJSFunction(CefRefPtr<CefBrowser> browser,
 	CefRefPtr<CefV8Value> jsFunction = obsStudioObj->GetValue(functionName);
 
 	if (jsFunction && jsFunction->IsFunction())
-		jsFunction->ExecuteFunction(NULL, arguments);
+		jsFunction->ExecuteFunction(nullptr, arguments);
 
 	context->Exit();
 }
@@ -310,7 +310,7 @@ bool BrowserApp::OnProcessMessageReceived(CefRefPtr<CefBrowser> browser,
 
 		CefRefPtr<CefV8Value> dispatchEvent =
 			globalObj->GetValue("dispatchEvent");
-		dispatchEvent->ExecuteFunction(NULL, arguments);
+		dispatchEvent->ExecuteFunction(nullptr, arguments);
 
 		context->Exit();
 
@@ -340,7 +340,7 @@ bool BrowserApp::OnProcessMessageReceived(CefRefPtr<CefBrowser> browser,
 		args.push_back(retval);
 
 		if (callback)
-			callback->ExecuteFunction(NULL, args);
+			callback->ExecuteFunction(nullptr, args);
 
 		context->Exit();
 
diff --git a/obs-browser-source.cpp b/obs-browser-source.cpp
index 113a9f6..abac2a5 100644
--- a/obs-browser-source.cpp
+++ b/obs-browser-source.cpp
@@ -178,12 +178,15 @@ bool BrowserSource::CreateBrowser()
 		cefBrowserSettings.default_font_size = 16;
 		cefBrowserSettings.default_fixed_font_size = 16;
 
+#if CHROME_VERSION_BUILD < 4430
 #if ENABLE_LOCAL_FILE_URL_SCHEME
 		if (is_local) {
 			/* Disable web security for file:// URLs to allow
-			 * local content access to remote APIs */
+			 * local content access to remote APIs
+			 * This flag was removed from CEF >= 91 */
 			cefBrowserSettings.web_security = STATE_DISABLED;
 		}
+#endif
 #endif
 
 		cefBrowser = CefBrowserHost::CreateBrowserSync(